Separate treatment of .stow and .nonstow marked dirs
Placing a .stow file in a directory tells Stow that this directory should be considered a Stow directory. This is already well-documented. There was an undocumented and slightly broken feature where placing a .nonstow file in a directory was treated in exactly the same way. The intention was for .nonstow to cause Stow to skip stowing into and unstowing from that directory and any of its descendants. However, it also caused Stow to consider symlinks into any of those directories as owned by Stow, even though that was clearly not the intention. So separate treatment of .stow and .nonstow markers, so that while both provide protection against Stow stowing and unstowing, only .stow affects the symlink ownership logic in find_stowed_path() and marked_stow_dir(). Probably no one uses the undocumented .nonstow feature, so it may make sense to remove this in future.
This commit is contained in:
parent
287d8016f6
commit
a2beb7b371
3 changed files with 22 additions and 16 deletions
|
@ -193,7 +193,7 @@ ok(
|
|||
=> q(don't unlink any nodes under another stow directory)
|
||||
);
|
||||
like($stderr,
|
||||
qr/WARNING: skipping protected directory stow2/
|
||||
qr/WARNING: skipping marked Stow directory stow2/
|
||||
=> "unstowing from ourself should skip stow");
|
||||
uncapture_stderr();
|
||||
|
||||
|
|
|
@ -216,8 +216,8 @@ uncapture_stderr();
|
|||
sub check_protected_dirs_skipped {
|
||||
for my $dir (qw{stow stow2}) {
|
||||
like($stderr,
|
||||
qr/WARNING: skipping protected directory $dir/
|
||||
=> "warn when skipping protected directory $dir");
|
||||
qr/WARNING: skipping marked Stow directory $dir/
|
||||
=> "warn when skipping marked directory $dir");
|
||||
}
|
||||
uncapture_stderr();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue