mirror of
https://github.com/urbit/shrub.git
synced 2025-01-03 18:16:30 +03:00
Check if directory already exists when using -c
This commit is contained in:
parent
cf68ac20ab
commit
829d65b40a
@ -322,6 +322,14 @@ main(c3_i argc,
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( c3y == u3_Host.ops_u.nuu ) {
|
||||
struct stat s;
|
||||
if ( !stat(u3_Host.dir_c, &s) ) {
|
||||
fprintf(stderr, "used -c but %s already exists\n", u3_Host.dir_c);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
u3_ve_sysopt();
|
||||
|
||||
printf("~\n");
|
||||
|
Loading…
Reference in New Issue
Block a user