Add comments justifying is_a_node($target) check in unstow_contents().

This commit is contained in:
Adam Spiers 2011-11-17 20:09:42 +00:00
parent 9012dd8aa8
commit 0592daf3ef

View file

@ -661,10 +661,13 @@ sub unstow_contents {
my $cwd = getcwd();
debug(2, "Unstowing from $target (cwd is $cwd)");
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")
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);
opendir my $DIR, $path