mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 20:34:26 -05:00
added extension for file names in partial dir, so them can be previewed in windows
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1390 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0ac7a92677
commit
f98d4f080b
@ -735,7 +735,16 @@ bool ftController::FileRequest(std::string fname, std::string hash,
|
||||
|
||||
{ RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
|
||||
savepath = mPartialsPath + "/" + hash;
|
||||
/* extension added to partial name to made
|
||||
* possible preview of partial files from gui */
|
||||
std::string ext = "";
|
||||
int pos = fname.find_last_of('.');
|
||||
if (pos > 0) /* don't apply for hidden files with no extension */
|
||||
{
|
||||
ext = fname.substr(pos);
|
||||
}
|
||||
|
||||
savepath = mPartialsPath + "/" + hash + ext;
|
||||
destination = dest + "/" + fname;
|
||||
|
||||
/* if no destpath - send to download directory */
|
||||
|
Loading…
Reference in New Issue
Block a user