[BUG_FIXED] Fix Project Manager writing file paths bug while saving under the root.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@822 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2011-10-04 00:16:50 +00:00
parent 33ce72fa6c
commit a0dfaf424c

View File

@ -374,7 +374,9 @@ generic_string ProjectPanel::getRelativePath(const generic_string & filePath, co
size_t pos_found = filePath.find(wsfn); size_t pos_found = filePath.find(wsfn);
if (pos_found == generic_string::npos) if (pos_found == generic_string::npos)
return filePath; return filePath;
const TCHAR *relativeFile = filePath.c_str() + lstrlen(wsfn) + 1; const TCHAR *relativeFile = filePath.c_str() + lstrlen(wsfn);
if (relativeFile[0] == '\\')
relativeFile++;
return relativeFile; return relativeFile;
} }