mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 09:05:24 -04:00
Fixed bug preventing hashing files from file paths with special characters
This commit is contained in:
parent
9381b744aa
commit
d49443caf3
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue