diff --git a/tools/update-server/qtox-updater-genflist/main.cpp b/tools/update-server/qtox-updater-genflist/main.cpp index 721751d90..cff37d792 100644 --- a/tools/update-server/qtox-updater-genflist/main.cpp +++ b/tools/update-server/qtox-updater-genflist/main.cpp @@ -9,8 +9,8 @@ using namespace std; /// Pass the target folder as first argument, no spaces allowed. We'll call that dir $TARGET -/// Update the content of $TARGET/files/ before calling this tool -/// We'll generate $TARGET/flist and exit +/// Update the content of $TARGET/source/ before calling this tool +/// We'll generate $TARGET/flist and $TARGET/files/ then exit /// We need qtox-updater-skey in our working directory to sign the flist /// /// The generated flist is very simple and just installs everything in the working directory ... @@ -45,14 +45,18 @@ int main(int argc, char* argv[]) return 1; } - QDir fdir(target+"/files/"); - if (!fdir.isReadable()) + // Wipe the /files/ folder + QDir(target+"/files/").removeRecursively(); + QDir(target).mkdir("files"); + + QDir sdir(target+"/source/"); + if (!sdir.isReadable()) { - cout << "ERROR: qtox-updater-genflist can't open the target files directory" << endl; + cout << "ERROR: qtox-updater-genflist can't open the target source directory" << endl; return 1; } - QStringList filesListStr = fdir.entryList(QDir::Files); + QStringList filesListStr = sdir.entryList(QDir::Files); /// Serialize the flist data QByteArray flistData; @@ -60,7 +64,7 @@ int main(int argc, char* argv[]) { cout << "Adding "<