diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 33c949b..b3bb9fc 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -15,7 +15,7 @@ jobs: - run: npm run build working-directory: frontend - run: mkdir build - - run: cmake -DCMAKE_BUILD_TYPE=Release .. + - run: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. working-directory: build - run: cmake --build . -j working-directory: build diff --git a/src/data/data_validate.cxx b/src/data/data_validate.cxx index 008fcc4..9f3f7dc 100644 --- a/src/data/data_validate.cxx +++ b/src/data/data_validate.cxx @@ -18,6 +18,10 @@ void validate_node(const std::string &username, const std::filesystem::path &use if (node->file) { auto file = user_dir / std::to_string(node->id); + if (!std::filesystem::exists(file) && node->size == 0) { + data_logger->warn("Created empty file for {}", name); + std::ofstream f{file}; + } ok(std::filesystem::exists(file), "{} is missing file on disk", name); auto size = std::filesystem::file_size(file); ok(node->size == size, "{} size does not match (Node,Disk): {} != {}", name, node->size, size); diff --git a/src/server/fs.cxx b/src/server/fs.cxx index 8de7d2f..a3d2dc3 100644 --- a/src/server/fs.cxx +++ b/src/server/fs.cxx @@ -236,7 +236,6 @@ void Server::FS_delete_nodes(std::string &&token, std::vector &&n stream.send(" Done\n"); todo.pop(); - std::this_thread::sleep_for(std::chrono::seconds{1}); } stream.close();