From b3194c864efa9ef28929e3769ecc35e7958fac49 Mon Sep 17 00:00:00 2001 From: Guillaume Morin Date: Wed, 2 Jan 2002 20:35:37 +0000 Subject: [PATCH] Stow now only warns the user if a subdirectory when unstowing --- ChangeLog | 5 +++++ stow.in | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e997b27..bf8d6e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 02 21:33:41 2002 Guillaume Morin + + * stow.in: Stow now only warns the user if a subdirectory + is unreadable during unstowing. + Wed Jan 02 20:58:05 2002 Guillaume Morin * stow.in: fixed JoinPaths so that subdir called "0" are diff --git a/stow.in b/stow.in index 1236058..08a73c1 100644 --- a/stow.in +++ b/stow.in @@ -202,8 +202,9 @@ sub Unstow { return (0, '') if (-e &JoinPaths($Target, $targetdir, '.stow')); warn sprintf("Unstowing in %s\n", &JoinPaths($Target, $targetdir)) if ($Verbose > 1); - opendir(DIR, &JoinPaths($Target, $targetdir)) || - die "$ProgramName: Cannot read directory \"$dir\" ($!)\n"; + if (!opendir(DIR, &JoinPaths($Target, $targetdir))) { + warn "Warning: $ProgramName: Cannot read directory \"$dir\" ($!). Stow might leave some links. If you think, it does. Rerun Stow with appropriate rights.\n"; + } @contents = readdir(DIR); closedir(DIR); foreach $content (@contents) {