-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
MediaObserver updating fails if media file_name changes but path doesn't #3090
Comments
I'd accept a PR that fixes this. |
Interestingly inside syncMediaPath, there is an attempt to check Indeed, if you change the filename, getPath returns a different result You would expect it to try and move it, via So this is an S3 issue only, the irony here being that it's recommend to set I found this issue on flysystem about the The issue in question is closed with |
As a test, I set The move command produced by
The move command produced by
(You'll note there is also a bug here, where an extra The failing one is the one that contains the disk's root, the working one is the one that doesn't. likely because calling I also don't know why you'd want both More questions than answers at this point. |
I think I've found the issue. The test to see if the file should be moved between folders is done via The actual move is done via As such, the test to see if the move should happen and the move do not use the same paths. hence it is failing. When Incoming PR. |
PRs for both main and v9 as we need this fixed in the branch that supports PHP7.4. Worth noting that a bunch of tests in v9 were failing before I made any changes, and the same tests were failing after I made my changes. |
Thanks! |
As noted in the discussion #3089 , if you set
moves_media_on_update
to true, and then update a media's file_name, but its generated path doesn't change theMediaObserver
exceptions with:on line 29 of the MediaObserver
This shouldn't be erroring out because a sync method shouldn't complain it can't move a file that doesn't need moving.
The example code that causes this to occur:
The text was updated successfully, but these errors were encountered: