Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
import: handle readonly parent directories
in the case where a parent directory of an import is read-only, things may fail in the unprivileged case because non-root cannot rm -rf a file that's -w. To fix this, we chmod +w the parent directory, and chmod it back at the end. Note that we can't defer the chmod back in chmodParentAndRemove(), since the subsequent copy will also not be able to overwrite the file, since the dir will be -w again. Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
- Loading branch information
Showing
2 changed files
with
62 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