diff --git a/repertory/repertory_test/include/mocks/mock_fuse_drive.hpp b/repertory/repertory_test/include/mocks/mock_fuse_drive.hpp index 63a1ee8d..1f51131c 100644 --- a/repertory/repertory_test/include/mocks/mock_fuse_drive.hpp +++ b/repertory/repertory_test/include/mocks/mock_fuse_drive.hpp @@ -135,11 +135,11 @@ public: if (not utils::file::file(to_file_path).remove()) { return -1; } - } else if (utils::file::directory(to_file_path).exists()) || + } else if (utils::file::directory(to_file_path).exists() || utils::file::file(to_file_path).exists()) { - errno = EEXIST; - return -1; - } + errno = EEXIST; + return -1; + } return rename(from_file_path.c_str(), to_file_path.c_str()); }