-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Bug Report
Q | A |
---|---|
Version(s) | 1.0.2 (current) |
Summary
When running the migration tool, it runs a rename()
operation on every file and directory, even if it is not being changed. Normally, this doesn't cause an error, but when encountering symlinks, the following can happen:
-
On Linux systems, you will receive warnings. For directories, these become
PHP Warning: rename(..., ...): Directory not empty
. For files, they arePHP Warning: rename(..., ...): Not a directory
. -
On Windows systems, they can be deleted entirely; see the forum post that originated this report.
Current behavior
Errors from attempts to rename symlinks on Linux, file/directory removal on Windows.
How to reproduce
Please see my comment on the forum post for instructions.
Expected behavior
No warnings, and no filename changes.
In the forum post that originated this report, neither filename was actually changing. I'd argue:
- We should check for a change in name, and skip the
rename()
operation if no change occurs. - We should never descend into a symlinked directory.
- We should skip symlinks on Windows.