Fossil SCM

Refuse a DESTINATION that is not a directory in deconstruct, so an existing file is never replaced.

dmestas 2026-11-20 21:15 UTC small-fixes
Commit ac947826fd789b0f10cce105fe91eda0eb521519a1fcb6ed94851bc4a1c84912
1 file changed +1 -1
+1 -1
--- src/rebuild.c
+++ src/rebuild.c
@@ -1478,11 +1478,11 @@
14781478
if( g.argc!=3 ){
14791479
usage ("?OPTIONS? DESTINATION");
14801480
}
14811481
/* get and check argument destination directory */
14821482
zDestDir = g.argv[g.argc-1];
1483
- if( !*zDestDir || !file_isdir(zDestDir, ExtFILE)) {
1483
+ if( !*zDestDir || file_isdir(zDestDir, ExtFILE)!=1) {
14841484
fossil_fatal("DESTINATION(%s) is not a directory!",zDestDir);
14851485
}
14861486
#ifndef _WIN32
14871487
if( file_access(zDestDir, W_OK) ){
14881488
fossil_fatal("DESTINATION(%s) is not writeable!",zDestDir);
14891489
--- src/rebuild.c
+++ src/rebuild.c
@@ -1478,11 +1478,11 @@
1478 if( g.argc!=3 ){
1479 usage ("?OPTIONS? DESTINATION");
1480 }
1481 /* get and check argument destination directory */
1482 zDestDir = g.argv[g.argc-1];
1483 if( !*zDestDir || !file_isdir(zDestDir, ExtFILE)) {
1484 fossil_fatal("DESTINATION(%s) is not a directory!",zDestDir);
1485 }
1486 #ifndef _WIN32
1487 if( file_access(zDestDir, W_OK) ){
1488 fossil_fatal("DESTINATION(%s) is not writeable!",zDestDir);
1489
--- src/rebuild.c
+++ src/rebuild.c
@@ -1478,11 +1478,11 @@
1478 if( g.argc!=3 ){
1479 usage ("?OPTIONS? DESTINATION");
1480 }
1481 /* get and check argument destination directory */
1482 zDestDir = g.argv[g.argc-1];
1483 if( !*zDestDir || file_isdir(zDestDir, ExtFILE)!=1) {
1484 fossil_fatal("DESTINATION(%s) is not a directory!",zDestDir);
1485 }
1486 #ifndef _WIN32
1487 if( file_access(zDestDir, W_OK) ){
1488 fossil_fatal("DESTINATION(%s) is not writeable!",zDestDir);
1489

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button