Fossil SCM
Fix an popen() error check in "fossil git export".
Commit
df5be59e5da46462cce08662775931e04de54aae42de68bdf08352fcecbd458a
Parent
b19081f3a396e00…
1 file changed
+1
-1
+1
-1
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -1460,11 +1460,11 @@ | ||
| 1460 | 1460 | #ifdef _WIN32 |
| 1461 | 1461 | xCmd = popen(zCmd, "wb"); |
| 1462 | 1462 | #else |
| 1463 | 1463 | xCmd = popen(zCmd, "w"); |
| 1464 | 1464 | #endif |
| 1465 | - if( zCmd==0 ){ | |
| 1465 | + if( xCmd==0 ){ | |
| 1466 | 1466 | fossil_fatal("cannot start the \"git fast-import\" command"); |
| 1467 | 1467 | } |
| 1468 | 1468 | fossil_free(zCmd); |
| 1469 | 1469 | } |
| 1470 | 1470 | |
| 1471 | 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( 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 |