Changeset 17680 for gsdl/trunk
- Timestamp:
- 2008-11-05T12:34:35+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/common-src/src/lib/gdbmclass.cpp
r17065 r17680 105 105 if (file_exists(txtgz_filename)) 106 106 { 107 text_t cmd = "gzip --decompress --to-stdout \"" + txtgz_filename + "\""; 108 cmd += " | txt2db \"" + filename + "\""; 109 107 //text_t cmd = "gzip --decompress --to-stdout \"" + txtgz_filename + "\""; 108 //cmd += " | txt2db \"" + filename + "\""; 109 110 text_t cmd; 111 #ifdef __WIN32__ 112 cmd = "perl -S txtgz-to-gdbm.pl \"" + txtgz_filename + "\" \"" + filename + "\""; 113 #else 114 cmd = "perl txtgz-to-gdbm.pl \"" + txtgz_filename + "\" \"" + filename + "\""; 115 #endif 116 110 117 int rv = gsdl_system(cmd, true, cerr); 118 // For some reason, launching this command with gsdl_system() still returns 1 119 // even when it returns 0 when run from the command-line. We can check whether 120 // we succeeded by looking at whether the output database file was created. 111 121 if (rv != 0) { 112 cerr << "Tried to run command \""<<cmd<<"\", but it failed\n"; 113 } 122 cerr << "\nWarning, non-zero return value on running command \"" 123 << cmd << "\": " << rv << endl; 124 if (!file_exists(filename)) { 125 cerr << "Tried to run command \""<<cmd<<"\", but it failed\n"; 126 } 127 } 114 128 } 115 129 }
Note:
See TracChangeset
for help on using the changeset viewer.