Fixed bug preventing hashing files from file paths with special characters

This commit is contained in:
hunbernd 2019-12-30 00:04:36 +01:00
parent 9381b744aa
commit d49443caf3

View File

@ -254,7 +254,13 @@ int RsDirUtil::breakupDirList(const std::string& path,
/**** Copied and Tweaked from ftcontroller ***/
bool RsDirUtil::fileExists(const std::string& filename)
{
#ifdef WINDOWS_SYS
std::wstring wfilename;
librs::util::ConvertUtf8ToUtf16(filename, wfilename);
return ( _waccess( wfilename.c_str(), F_OK ) != -1 );
#else
return ( access( filename.c_str(), F_OK ) != -1 );
#endif
}
bool RsDirUtil::moveFile(const std::string& source,const std::string& dest)