mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
fixed check free space for the portable version in windows
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2986 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b4a4ce07af
commit
98c99172c0
@ -61,9 +61,15 @@ bool RsDiscSpace::crossSystemDiskStats(const char *file, uint32_t& free_blocks,
|
||||
szDrive[1] = file[1] ;
|
||||
szDrive[2] = file[2] ;
|
||||
#else
|
||||
char szDrive[4];
|
||||
char szDrive[4] = "";
|
||||
|
||||
memcpy (szDrive, file, 3);
|
||||
char *pszFullPath = _fullpath (NULL, file, 0);
|
||||
if (pszFullPath == 0) {
|
||||
std::cerr << "Size estimate failed for drive (_fullpath) " << szDrive << std::endl ;
|
||||
return false;
|
||||
}
|
||||
_splitpath (pszFullPath, szDrive, NULL, NULL, NULL);
|
||||
free (pszFullPath);
|
||||
#endif
|
||||
szDrive[3] = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user