From 868497293cc4e4d6dd40c91dbd1b13f9e9a398cc Mon Sep 17 00:00:00 2001 From: Mutzi Date: Tue, 21 May 2024 15:37:26 +0200 Subject: [PATCH] Changed build type --- .gitea/workflows/build.yaml | 2 +- src/data/data_validate.cxx | 4 ++++ src/server/fs.cxx | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) 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();