diff options
Diffstat (limited to 'src/zencore/filesystem.cpp')
| -rw-r--r-- | src/zencore/filesystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp index 93383a656..9ca5f1131 100644 --- a/src/zencore/filesystem.cpp +++ b/src/zencore/filesystem.cpp @@ -902,14 +902,14 @@ MoveToFile(std::filesystem::path Path, IoBuffer Data) { return false; } - int Ret = link(SourcePath.c_str(), Path.c_str()); + int Ret = rename(SourcePath.c_str(), Path.c_str()); if (Ret < 0) { int32_t err = errno; if (err == ENOENT) { zen::CreateDirectories(Path.parent_path()); - Ret = link(SourcePath.c_str(), Path.c_str()); + Ret = rename(SourcePath.c_str(), Path.c_str()); } } if (Ret < 0) |