-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ExtUtils::Install handle symbolic and hard links
[perl #72028] When upgrading an already-installed file, ExtUtils::Install could mess up the permissions of files if the old versions of files were hard or symbolic links. For example, if the Foo module had been installed as lib/Foo.pm and for some reason (perhaps due to OS packaging) that file was hard-linked to other/Foo.pm or replaced with a symbolic link to other/Foo.pm, then when trying to install a newer release of Foo, the permissions of the other/Foo.pm file could end up messed up. This was due to ExtUtils::Install changing the permissions of the old file before unlinking it; if the file was a link, then the linked file would get the chmod instead. Since on POSIXy platforms it is the directory permissions, not the file permissions, that affect whether a file can be unlinked, the chmod was redundant anyway. So on these platforms, skip the chmod. I've also added tests for symlinked and hard-linked files.
- Loading branch information
Showing
2 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters