Skip to content

Removed special handling of part files in shared storage rename - #6687

Merged
PVince81 merged 1 commit into
masterfrom
sharing-fixpartfilehandling
Jan 9, 2014
Merged

PVince81 merged 1 commit into
masterfrom
sharing-fixpartfilehandling

Conversation

@PVince81

@PVince81 PVince81 commented Jan 8, 2014

Copy link
Copy Markdown
Contributor

This fixes the issue introduced by the transfer id which itself wasn't
taken into account by the shortcut code for part file in the shared
storage class.

Fixes #6608

Please review @DeepDiver1975 @karlitschek @icewind1991 @schiesbn

This fixes the issue introduced by the transfer id which itself wasn't
taken into account by the shortcut code for part file in the shared
storage class.
@karlitschek

Copy link
Copy Markdown
Contributor

great fix 👍

@JockeA

JockeA commented Jan 8, 2014

Copy link
Copy Markdown

Thanks. Will try tomorrow!

@reiherm

reiherm commented Jan 8, 2014

Copy link
Copy Markdown

Thanks. It works for me.

@ghost

ghost commented Jan 8, 2014

Copy link
Copy Markdown

@tripflex

tripflex commented Jan 9, 2014

Copy link
Copy Markdown
Contributor

Well I guess I can at least now reference the issues I went through, but def should have probably looked at PR before going through all the open issues and troubleshooting ... oh well :) Was bittersweet to find the fix just sitting there waiting in a PR!

This fix worked for me and hopefully should for others having the same type of problems!

@PVince81

PVince81 commented Jan 9, 2014

Copy link
Copy Markdown
Contributor Author

@tripflex thanks for the linking and the feedback.

@icewind1991

Copy link
Copy Markdown
Contributor

👍

@tustudium

Copy link
Copy Markdown

@PVince81 just installed the latest build (from today) and tested it, i still see this behaviour (like described in issue #331), i.e.

uploading a new file on a shared folder, e.g. a pdf file (also < 10mb file size), results in several

.pdf.oc.TransferID12345789
.pdf.oc.TransferID23482347

files.

in the owncloud.log i get

{"app":"OC\Files\Cache\Scanner","message":"!!! Path 'test/test.pdf' is not readable !!!","level":0,"time":"2014-01-09T13:50:58+00:00"}
{"app":"OC\Files\Cache\Scanner","message":"!!! Path 'test/test.pdf' is not readable !!!","level":0,"time":"2014-01-09T13:50:58+00:00"}
{"app":"OC\Files\Cache\Scanner","message":"!!! Path 'test/test.pdf' is not readable !!!","level":0,"time":"2014-01-09T13:50:58+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for /var/www/clients/client2/web1/web/test/cloud/data/admin/files\test.pdf at /var/www/clients/client2/web1/web/test/cloud/lib/private/files/storage/local.php#127","level":2,"time":"2014-01-09T13:50:58+00:00"}
{"app":"OC\Files\Cache\Scanner","message":"!!! No reuse of etag for 'test/' !!! \ncache: Array\n(\n [fileid] => 1453\n [storage] => bbe1cc6a32681d3e38dbca951a982109\n [path] => files/test/\n [parent] => 315\n [name] => 1080 - test\n [mimetype] => httpd/unix-directory\n [mimepart] => httpd\n [size] => 10212897\n [mtime] => 1389275425\n [storage_mtime] => 1389275425\n [encrypted] => \n [unencrypted_size] => 0\n [etag] => 52cea9217bbae\n)\n \ndata: Array\n(\n [mimetype] => httpd/unix-directory\n [mtime] => 1389275458\n [size] => -1\n [etag] => 52cea94275bf6\n [storage_mtime] => 1389275458\n)\n","level":0,"time":"2014-01-09T13:50:58+00:00"}
{"app":"files_sharing","message":"File source not found for: /files\test.pdf.ocTransferId1214384652","level":3,"time":"2014-01-09T13:50:58+00:00"}
{"app":"files_sharing","message":"File source not found for: /files\test.pdf.ocTransferId1214384652","level":3,"time":"2014-01-09T13:50:58+00:00"}

@PVince81

PVince81 commented Jan 9, 2014

Copy link
Copy Markdown
Contributor Author

@tustudium this PR/patch hasn't been merged yet, so it's not present in the build.

Will merge it now as the review is complete.

PVince81 pushed a commit that referenced this pull request Jan 9, 2014
Removed special handling of part files in shared storage rename
@PVince81
PVince81 merged commit b24c21b into master Jan 9, 2014
@PVince81
PVince81 deleted the sharing-fixpartfilehandling branch January 9, 2014 14:17
@PVince81

PVince81 commented Jan 9, 2014

Copy link
Copy Markdown
Contributor Author

Backported to stable6 as a711d4e

@tustudium

Copy link
Copy Markdown

@PVince81 thanks for the info!

@dali-dbr

dali-dbr commented Jan 9, 2014

Copy link
Copy Markdown

Hi.

I replaced modified sharedstorage.php and files.php, restarted apache, but I still get an error. Is there anything else I should do? Thx

@PVince81

PVince81 commented Jan 9, 2014

Copy link
Copy Markdown
Contributor Author

@dali-dbr I guess it should work that way. Are you sure it's the same error ?

@dali-dbr

dali-dbr commented Jan 9, 2014

Copy link
Copy Markdown

hm, actually it works if I use new folders and new filenames. I'm guessing some data was left in database or on server not allowing the same filenames or same folders to be overwritten.

For an example. If I create "newfolder" and upload "newfile.rar" inside its ok.

If I create folder "test" and upload "test.rar" is not ok. (both already existed before)

I hope it help in any way.

@PVince81

Copy link
Copy Markdown
Contributor Author

@dali-dbr with upload do you mean with the sync client ?
How can you upload the file if it already exists ?
I'd expect the sync client to first download "test/test.rar" if it exists, then you'd overwrite that file locally, then the sync client uploads the new version.
If you try to upload test.rar before the sync client downloads, then you'd get a conflict.

@dali-dbr

Copy link
Copy Markdown

I was referring to the same files that was troubled before the fix. Even if were deleted, there was problems uploading same file names and the problems persisted even after the fix. Today I'm trying to reproduce the problem, but all it seems to be working OK, so never mind now.

Thank you for your help.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants