You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the MigrateFileTask after upgrading from SS3.x to SS4.x, If you have legacy_filenames: true set in your codebase, it will cause the migration to read and write the same file which causes 0 bytes to be written to each file.
This is because the $path and $filename variables being parsed refer to the same file ($path - absolute path of file, $filename - relative path of file) meaning that Flysystem will open up a read handler on $path and then stream its content to $filename which is the same file.
Managed to resolve this issue locally by changing the Conflict resolution in the Helper to "Keep original" rather than "Overwrite" when legacy_filenames is set to true.
silverstripe-assets/src/FileMigrationHelper.php
Line 125 in 6b599be
When running the
MigrateFileTask
after upgrading from SS3.x to SS4.x, If you havelegacy_filenames: true
set in your codebase, it will cause the migration to read and write the same file which causes 0 bytes to be written to each file.This is because the
$path
and$filename
variables being parsed refer to the same file ($path
- absolute path of file,$filename
- relative path of file) meaning that Flysystem will open up a read handler on $path and then stream its content to $filename which is the same file.Related PRs
The text was updated successfully, but these errors were encountered: