Fix ROM audit in Windows (fixes #988).

This commit is contained in:
Stephen Anthony 2023-09-12 19:42:15 -02:30
parent e030c8dea9
commit c6e72beeff
1 changed files with 6 additions and 0 deletions

View File

@ -206,7 +206,13 @@ bool FSNodeWINDOWS::makeDir()
bool FSNodeWINDOWS::rename(string_view newfile)
{
if (!_isPseudoRoot && MoveFile(_path.c_str(), string{newfile}.c_str()) != 0)
{
_path = newfile;
if (_path[0] == '~')
_path.replace(0, 1, HomeFinder::getHomePath());
return setFlags();
}
return false;
}