Skip to content

Commit 64ccef7

Browse files
committed
Do not use inline functions for mkdir and rename
1 parent bc7aa60 commit 64ccef7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

libraries/FS/src/vfs_api.cpp

+2-12
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ bool VFSImpl::exists(const char* path)
8181
return false;
8282
}
8383

84-
static inline int real_rename(const char* f, const char* t)
85-
{
86-
return rename(f,t);
87-
}
88-
8984
bool VFSImpl::rename(const char* pathFrom, const char* pathTo)
9085
{
9186
if(!_mountpoint) {
@@ -114,7 +109,7 @@ bool VFSImpl::rename(const char* pathFrom, const char* pathTo)
114109
}
115110
sprintf(temp1,"%s%s", _mountpoint, pathFrom);
116111
sprintf(temp2,"%s%s", _mountpoint, pathTo);
117-
auto rc = real_rename(temp1, temp2);
112+
auto rc = ::rename(temp1, temp2);
118113
free(temp1);
119114
free(temp2);
120115
return rc == 0;
@@ -153,11 +148,6 @@ bool VFSImpl::remove(const char* path)
153148
return rc == 0;
154149
}
155150

156-
static inline int real_mkdir(const char* f)
157-
{
158-
return mkdir(f, ACCESSPERMS);
159-
}
160-
161151
bool VFSImpl::mkdir(const char *path)
162152
{
163153
if(!_mountpoint) {
@@ -182,7 +172,7 @@ bool VFSImpl::mkdir(const char *path)
182172
return false;
183173
}
184174
sprintf(temp,"%s%s", _mountpoint, path);
185-
auto rc = real_mkdir(temp);
175+
auto rc = ::mkdir(temp, ACCESSPERMS);
186176
free(temp);
187177
return rc == 0;
188178
}

0 commit comments

Comments
 (0)