-
Notifications
You must be signed in to change notification settings - Fork 12
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
Issue with Moving Directories During Update Package Installation #49
Comments
@Dheyvidj It is interesting that "rename" causes a "copy" on your installation. |
My installation is in a Docker container that uses several volumes. I believe these volumes might be directly influencing the issue. However, I made some modifications to the code that worked for me, but I am not certain about its effectiveness in different installation environments. I suspect that the use of Docker volumes might be causing rename() to fail and triggering an internal copy() operation. |
Ok, thanks for the details. Maybe we could add a
|
Sounds like a bug in
Note that |
Found the bug reported in 2011: PHP :: Bug #54097 :: rename() of dirs accross devices produces confusing copy error Is this language actually maintained any more? 🤔 Loads of people must have wasted their time with this being unfixed and undocumented. Be it on Windows, with tmp file systems and especially since containerization started. |
We are experiencing an issue with the update package installation process in our application. Specifically, the problem occurs when trying to move directories using the
rename()
function, which results in an error. The error message is as follows:Detailed Problem:
The error occurs when attempting to move directories such as
vendor
,humhub
, andstatic
to the backup directory and replacing these directories with new ones from the update package. The current code uses therename()
function for this task, which does not support directory copy operations.Steps to Reproduce:
install()
function from theUpdatePackage
class.vendor
,humhub
, andstatic
directories to the backup directory and replace them with new directories.Impact:
rename()
function fails when trying to move directories, resulting in the failure of the update package installation.Proposed Solution:
Replace the use of the
rename()
function with a method that correctly copies and removes directories. It is suggested to use thecopyDirectory()
function to copy the directories and then remove the old directories usingFileHelper::removeDirectory()
.Current Code (for reference):
Suggested Code (with fix):
The fix will allow proper movement of directories during the update process.
The text was updated successfully, but these errors were encountered: