Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rename+overwrite GDrive case #26156

Closed
wants to merge 1 commit into from
Closed

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Sep 20, 2016

Description

Prevents having duplicate files appear in GDrive by properly explicitly
deleting the target file. This is because GDrive allows having multiple files with the same file name inside the same folder...

Related Issue

Fixes #25827

Motivation and Context

How Has This Been Tested?

  • TEST: manual test with Webdav overwrite (cadaver)
  • TEST: unit test

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

More tests fail now than before:

There were 4 failures:

1) OCA\Files_External\Tests\Storage\GoogleTest::testStat
Failed asserting that false is true.

/srv/www/htdocs/owncloud/tests/lib/Files/Storage/Storage.php:288

2) OCA\Files_External\Tests\Storage\GoogleTest::testRenameOverWriteDirectory
target/test2.txt has not been removed
Failed asserting that true is false.

/srv/www/htdocs/owncloud/tests/lib/Files/Storage/Storage.php:491

3) OCA\Files_External\Tests\Storage\GoogleTest::testRenameOverWriteDirectoryOverFile
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'foo'
+'bar'

/srv/www/htdocs/owncloud/tests/lib/Files/Storage/Storage.php:505

4) OCA\Files_External\Tests\Storage\GoogleTest::testCopyOverWriteDirectory
Failed asserting that true is false.

/srv/www/htdocs/owncloud/tests/lib/Files/Storage/Storage.php:543

FAILURES!
Tests: 81, Assertions: 422, Failures: 4

Known previous failures: #22481

Prevents having duplicate files appear in GDrive by properly explicitly
deleting the target file.
@mention-bot
Copy link

@PVince81, thanks for your PR! By analyzing the annotation information on this pull request, we identified @AdamWill, @icewind1991, @MTGap and @Xenopathic to be potential reviewers

@PVince81 PVince81 added this to the 9.1.2 milestone Sep 20, 2016
@PVince81 PVince81 modified the milestones: 9.1.3, 9.1.2 Oct 19, 2016
@PVince81 PVince81 modified the milestones: 9.2, 9.1.3 Nov 30, 2016
@PVince81 PVince81 modified the milestones: 10.0.1, 10.0 Apr 6, 2017
@PVince81
Copy link
Contributor Author

PVince81 commented Apr 6, 2017

I'll have another look at this for 10.0.1

@DeepDiver1975 DeepDiver1975 modified the milestones: 10.0.1, 10.1 May 17, 2017
@PVince81
Copy link
Contributor Author

PVince81 commented Feb 7, 2018

did not work. to be reconsidered in https://github.com/owncloud/files_external_gdrive

@PVince81 PVince81 closed this Feb 7, 2018
@PVince81 PVince81 deleted the gdrive-fix-rename-overwrite branch September 27, 2018 13:36
@lock lock bot locked as resolved and limited conversation to collaborators Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GDrive doesn't properly create versions / file rename + overwrite doesn't work as intended
4 participants