]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/sg_binobj.cxx
Make tsync part of libSimGearCore when building shared libraries
[simgear.git] / simgear / io / sg_binobj.cxx
index a4fbc8ff15e8ec80b5fd4f3d4f4714e4df2306b8..f511164064fc5f0d3bafb39ce71e548baa50da3a 100644 (file)
@@ -1006,9 +1006,13 @@ bool SGBinObject::write_ascii( const string& base, const string& name,
     fclose(fp);
 
     string command = "gzip --force --best " + file.str();
-    system(command.c_str());
+    int err = system(command.c_str());
+    if (err)
+    {
+        cout << "ERROR: gzip " << file.str() << " failed!" << endl;
+    }
 
-    return true;
+    return (err == 0);
 }
 
 void SGBinObject::read_properties(gzFile fp, int nproperties)