From a0dfaf424cb37f21aaf83261aed29d852f3b61ef Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 4 Oct 2011 00:16:50 +0000 Subject: [PATCH] [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 --- PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index d5ae3ac5..930599b4 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -374,7 +374,9 @@ generic_string ProjectPanel::getRelativePath(const generic_string & filePath, co size_t pos_found = filePath.find(wsfn); if (pos_found == generic_string::npos) 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; }