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 GDrive upload file which name might match the one of a folder #25007

Merged
merged 1 commit into from
Jun 8, 2016

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Jun 7, 2016

Whenever a file is uploaded to GDrive, there is a check for that file
with and without extension, due to Google Docs files having no
extension. This logic now only kicks in whenever the detected
extensionless file is really a Google Doc file, not a folder.

This makes it possible again to upload a file "test.txt" in a folder
that also has a folder called "test"

Fixes #24631

Whenever a file is uploaded to GDrive, there is a check for that file
with and without extension, due to Google Docs files having no
extension. This logic now only kicks in whenever the detected
extensionless file is really a Google Doc file, not a folder.

This makes it possible again to upload a file "test.txt" in a folder
that also has a folder called "test"
@PVince81
Copy link
Contributor Author

PVince81 commented Jun 7, 2016

Please review @icewind1991 @Xenopathic @rullzer

I'll rerun the GDrive tests locally and post the result.

@PVince81
Copy link
Contributor Author

PVince81 commented Jun 7, 2016

Oh wow, that's cool:

Runtime:        PHP 5.5.14 with Xdebug 2.3.3
Configuration:  /srv/www/htdocs/owncloud/tests/phpunit-autotest.xml
Warning:        Deprecated configuration setting "strict" used

.............................................F..............F..F. 65 / 81 ( 80%)
................

Time: 10.42 minutes, Memory: 53.50Mb

There were 3 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/test1.txt has not been overwritten
Failed asserting that false matches expected 'foo'.

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

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

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

FAILURES!
Tests: 81, Assertions: 419, Failures: 3.

less failures than master a while ago: #22481

@icewind1991
Copy link
Contributor

👍 looks good

@guruz
Copy link
Contributor

guruz commented Jun 8, 2016

👍

@PVince81 PVince81 merged commit 4fd55c2 into master Jun 8, 2016
@PVince81 PVince81 deleted the gdrive-fixuploadsamenameasfolder branch June 8, 2016 07:46
@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 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 can't upload files if name without extension already exists
3 participants