mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Check the results after a file entry rename
This commit is contained in:
parent
5880777e18
commit
794800fb83
@ -769,7 +769,9 @@ bool PathRename(const char* path, const char* newname) {
|
|||||||
strncpy(npath, path, oldname - path);
|
strncpy(npath, path, oldname - path);
|
||||||
strncpy(npath + (oldname - path), newname, 255 - (oldname - path));
|
strncpy(npath + (oldname - path), newname, 255 - (oldname - path));
|
||||||
|
|
||||||
return (f_rename(path, npath) == FR_OK);
|
if (fvx_rename(path, npath) != FR_OK) return false;
|
||||||
|
if ((fvx_stat(path, NULL) == FR_OK) || (fvx_stat(npath, NULL) != FR_OK)) return false; // safety check
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PathAttr(const char* path, u8 attr, u8 mask) {
|
bool PathAttr(const char* path, u8 attr, u8 mask) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user