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
The method works as expected when moving files across volumes or when moving directories within the same volume. It is only whenever the $from and $to arguments are directories that are mounted on different volumes, then the error occurs.
For example, this will affect installations where /ossn_data is mounted on a different volume to that which the website files are mounted. When $Ossn->userdata and ossn_route()->www are mounted on separate volumes, it is impossible to upload and install components or themes.
While investigating the issue on the forked project, I happened to find a simple solution: by recursively calling the OssnFile::moveFiles() method for any filenames within the directory that are also directories and using the PHP rename function only if the filename points to a file that is not a directory, then the bug is never encountered:
This bug affects the file
/classes/OssnFile.php
at the methodmoveFiles()
.An error occurs when using the copy() or rename() functions to move a directory from one volume to a different volume.
Eg:
This is a known bug in PHP:
https://bugs.php.net/bug.php?id=54097
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/723330m
The method works as expected when moving files across volumes or when moving directories within the same volume. It is only whenever the
$from
and$to
arguments are directories that are mounted on different volumes, then the error occurs.For example, this will affect installations where
/ossn_data
is mounted on a different volume to that which the website files are mounted. When$Ossn->userdata
andossn_route()->www
are mounted on separate volumes, it is impossible to upload and install components or themes.While investigating the issue on the forked project, I happened to find a simple solution: by recursively calling the
OssnFile::moveFiles()
method for any filenames within the directory that are also directories and using the PHPrename
function only if the filename points to a file that is not a directory, then the bug is never encountered:This is the patch file of that change:
aa801418980bc0ce28529f292c4f3031f1ba5ee4.patch.txt
The text was updated successfully, but these errors were encountered: