Add comments justifying is_a_node($target) check in unstow_contents().
This commit is contained in:
parent
9012dd8aa8
commit
0592daf3ef
1 changed files with 5 additions and 2 deletions
7
stow.in
7
stow.in
|
@ -661,10 +661,13 @@ sub unstow_contents {
|
||||||
my $cwd = getcwd();
|
my $cwd = getcwd();
|
||||||
debug(2, "Unstowing from $target (cwd is $cwd)");
|
debug(2, "Unstowing from $target (cwd is $cwd)");
|
||||||
debug(3, "--- source path is $path");
|
debug(3, "--- source path is $path");
|
||||||
# We traverse the source tree not the target tree,
|
# We traverse the source tree not the target tree, so $path must exist.
|
||||||
error("unstow_contents() called with non-directory path: $path")
|
error("unstow_contents() called with non-directory path: $path")
|
||||||
unless -d $path;
|
unless -d $path;
|
||||||
error("unstow_contents() called with non-directory target: $target")
|
# When called at the top level, $target should exist. And
|
||||||
|
# unstow_node() should only call this via mutual recursion if
|
||||||
|
# $target exists.
|
||||||
|
error("unstow_contents() called with invalid target: $target")
|
||||||
unless is_a_node($target);
|
unless is_a_node($target);
|
||||||
|
|
||||||
opendir my $DIR, $path
|
opendir my $DIR, $path
|
||||||
|
|
Loading…
Reference in a new issue