feat: fix file rename implementation
This commit is contained in:
@@ -81,6 +81,10 @@ namespace Montauk {
|
||||
return Fs::Vfs::VfsMkdir(path);
|
||||
}
|
||||
|
||||
static int Sys_FRename(const char* oldPath, const char* newPath) {
|
||||
return Fs::Vfs::VfsRename(oldPath, newPath);
|
||||
}
|
||||
|
||||
static int Sys_DriveList(int* outDrives, int maxEntries) {
|
||||
return Fs::Vfs::VfsDriveList(outDrives, maxEntries);
|
||||
}
|
||||
|
||||
@@ -200,6 +200,10 @@ namespace Montauk {
|
||||
case SYS_FMKDIR:
|
||||
if (!ValidUserPtr(frame->arg1)) return -1;
|
||||
return (int64_t)Sys_FMkdir((const char*)frame->arg1);
|
||||
case SYS_FRENAME:
|
||||
if (!ValidUserPtr(frame->arg1)) return -1;
|
||||
if (!ValidUserPtr(frame->arg2)) return -1;
|
||||
return (int64_t)Sys_FRename((const char*)frame->arg1, (const char*)frame->arg2);
|
||||
case SYS_DRIVELIST:
|
||||
if (!ValidUserPtr(frame->arg1)) return -1;
|
||||
return (int64_t)Sys_DriveList((int*)frame->arg1, (int)frame->arg2);
|
||||
|
||||
@@ -182,6 +182,9 @@ namespace Montauk {
|
||||
static constexpr uint64_t SYS_SETUSER = 92;
|
||||
static constexpr uint64_t SYS_GETUSER = 93;
|
||||
|
||||
/* Filesystem.hpp */
|
||||
static constexpr uint64_t SYS_FRENAME = 94;
|
||||
|
||||
static constexpr int SOCK_TCP = 1;
|
||||
static constexpr int SOCK_UDP = 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user