From 8cb41d1088c0f71ce79aa78e3c4d04eb9e40d61a Mon Sep 17 00:00:00 2001 From: Guillaume Morin Date: Sun, 30 Dec 2001 21:10:46 +0000 Subject: [PATCH] fixed bug when Target was relative --- ChangeLog | 6 ++++++ stow.in | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index d5db160..43cfbbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Dec 30 21:58:25 2001 Guillaume Morin + + * stow.in: fixed a bug introduced by previous changes when + Target argument was relative. (thanks to Luca Filipozzi + for pointing this out) + Sun Dec 30 18:23:25 2001 Guillaume Morin * stow.in: now requires Perl 5. Use POSIX getcwd instead of broken diff --git a/stow.in b/stow.in index 50e40d7..28a0650 100644 --- a/stow.in +++ b/stow.in @@ -109,11 +109,14 @@ while (@ARGV && ($_ = $ARGV[0]) && /^-/) { &usage("No packages named") unless @ARGV; +$current_dir = &getcwd; if ($Stow) { chdir($Stow) || die "Cannot chdir to target tree $Stow ($!)\n"; } $Stow = &getcwd; +chdir($current_dir) || die "Your directory does not seem to exist anymore ($!)\n"; + $Target = &parent($Stow) unless $Target; chdir($Target) || die "Cannot chdir to target tree $Target ($!)\n";