Fossil SCM

Fix an popen() error check in "fossil git export".

drh 2021-01-06 14:27 trunk
Commit df5be59e5da46462cce08662775931e04de54aae42de68bdf08352fcecbd458a
1 file changed +1 -1
+1 -1
--- src/export.c
+++ src/export.c
@@ -1460,11 +1460,11 @@
14601460
#ifdef _WIN32
14611461
xCmd = popen(zCmd, "wb");
14621462
#else
14631463
xCmd = popen(zCmd, "w");
14641464
#endif
1465
- if( zCmd==0 ){
1465
+ if( xCmd==0 ){
14661466
fossil_fatal("cannot start the \"git fast-import\" command");
14671467
}
14681468
fossil_free(zCmd);
14691469
}
14701470
14711471
--- src/export.c
+++ src/export.c
@@ -1460,11 +1460,11 @@
1460 #ifdef _WIN32
1461 xCmd = popen(zCmd, "wb");
1462 #else
1463 xCmd = popen(zCmd, "w");
1464 #endif
1465 if( zCmd==0 ){
1466 fossil_fatal("cannot start the \"git fast-import\" command");
1467 }
1468 fossil_free(zCmd);
1469 }
1470
1471
--- src/export.c
+++ src/export.c
@@ -1460,11 +1460,11 @@
1460 #ifdef _WIN32
1461 xCmd = popen(zCmd, "wb");
1462 #else
1463 xCmd = popen(zCmd, "w");
1464 #endif
1465 if( xCmd==0 ){
1466 fossil_fatal("cannot start the \"git fast-import\" command");
1467 }
1468 fossil_free(zCmd);
1469 }
1470
1471

Keyboard Shortcuts

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