Add new Zone wizard

This commit is contained in:
2018-01-29 23:56:36 -06:00
parent eebce9924d
commit 68bb2729d7
15 changed files with 85 additions and 60 deletions

View File

@@ -125,30 +125,36 @@ int run(ClArgs args) {
fsBuff = fs->buff(); // update fsBuff pointer in case there is a new buff
err |= fs->write(argInode, imgDataBuff, imgDataBuffSize);
if (argCompact) {
fs->resize();
}
if (!err) {
if (argCompact) {
fs->resize();
}
auto fsFile = fopen(argFsPath.toUtf8(), "wb");
if (fsFile) {
err = fwrite(fsBuff, fs->size(), 1, fsFile) != 1;
err |= fclose(fsFile);
if (err) {
cerr << "Could not write to file system file.\n";
auto fsFile = fopen(argFsPath.toUtf8(), "wb");
if (fsFile) {
err = fwrite(fsBuff, fs->size(), 1, fsFile) != 1;
err |= fclose(fsFile);
if (err) {
cerr << "Could not write to file system file.\n";
}
} else {
err = 2;
}
} else {
err = 2;
err = 3;
}
delete fs;
} else {
err = 3;
err = 4;
}
}
delete[] fsBuff;
if (fsBuff) {
delete[] fsBuff;
}
} else {
err = 4;
err = 5;
}
return err;