Skip to content
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

Do not rename or move symlinks #36

Open
weierophinney opened this issue Feb 5, 2020 · 2 comments
Open

Do not rename or move symlinks #36

weierophinney opened this issue Feb 5, 2020 · 2 comments
Labels
Bug Something isn't working Help Wanted Extra attention is needed

Comments

@weierophinney
Copy link
Member

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 are PHP 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.
@djgogo
Copy link

djgogo commented Feb 6, 2020

I forgot to tell you that the symlink problem happened on a Mac OS dev environment.

@weierophinney weierophinney added Bug Something isn't working Help Wanted Extra attention is needed labels Jan 5, 2021
@Julienh
Copy link

Julienh commented Feb 9, 2021

Hello,
I just got this problem.

I'm on Windows 10 and I use WSL 1 with Debian 10.
/project/public/assert is a Windows symbolic links to /project2/public/assert
=> /project2/public/assert moved to /project/ssets (assert without a)

Thank you for the migration tool !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants