remove trailing / in directories if any
authorgc <gc>
Sat, 5 Mar 2005 13:27:31 +0000 (13:27 +0000)
committergc <gc>
Sat, 5 Mar 2005 13:27:31 +0000 (13:27 +0000)
booh

diff --git a/booh b/booh
index 3e8e32775c447b8a6b3cd521fb861a7f5e85880f..bfaa7f496f37a7d47f2dbcc0c890e76602cda22c 100755 (executable)
--- a/booh
+++ b/booh
@@ -79,12 +79,12 @@ def handle_options
                 $no_check = true
 
             when '--source'
-                $source = arg
+                $source = arg.sub(%r|/$|, '')
                 if !File.directory?($source)
                     die "Argument to --source must be a directory"
                 end
             when '--destination'
-                $dest = arg
+                $dest = arg.sub(%r|/$|, '')
                 if File.exists?($dest) && !File.directory?($dest)
                     die "If --destination exists, it must be a directory"
                 end