summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit6
1 files changed, 6 insertions, 0 deletions
diff --git a/dgit b/dgit
index 17b7189..d587527 100755
--- a/dgit
+++ b/dgit
@@ -1515,6 +1515,12 @@ sub cmd_clone {
}
$dstdir ||= "$package";
+ if (stat $dstdir) {
+ fail "$dstdir already exists";
+ } elsif ($! != &ENOENT) {
+ die "$dstdir: $!";
+ }
+
my $cwd_remove;
if ($rmonerror && !$dryrun_level) {
$cwd_remove= getcwd();