From 621f04db7a891ffbf8a8a65f1e559ba928fb1223 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Sat, 15 Jul 2023 00:43:02 +0200 Subject: [PATCH] fix readlink --- .github/workflows/cmake.yml | 2 +- src/fuse/srcs/RepoFS.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index e97a318..9bbc462 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -31,7 +31,7 @@ jobs: - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc) - name: Test working-directory: ${{github.workspace}}/build diff --git a/src/fuse/srcs/RepoFS.cpp b/src/fuse/srcs/RepoFS.cpp index 8147906..76efd12 100644 --- a/src/fuse/srcs/RepoFS.cpp +++ b/src/fuse/srcs/RepoFS.cpp @@ -136,6 +136,8 @@ static int rfsReadlink(const char *path, char *buf, size_t size) { if (entry->file->fileType != File::Type::Symlink) return -ENOENT; auto dst = Serialize::deserialize(RepoFS::repo->getObject(entry->file->chunks.at(0))); strncpy(buf, dst.data.data(), std::min(dst.data.size(), size)); + + return 0; } static struct fuse_operations rfsOps = {