summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-04-29 13:49:47 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-04-29 13:49:47 +0200
commit4a0aa9616019c35de1c09e58678523beeccdd98f (patch)
tree2d6337a625995d35d405fcfed0854afe00eef81d /src
parentd49f35817e781ed4f5cd085f014a89802bca2b39 (diff)
fix bug in compact_path
Diffstat (limited to 'src')
-rw-r--r--src/file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file.cc b/src/file.cc
index 2366c2c4..b4c793ed 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -72,9 +72,9 @@ String compact_path(const String& filename)
char cwd[1024];
getcwd(cwd, 1024);
- String real_cwd = real_path(cwd);
+ String real_cwd = real_path(cwd) + '/';
if (real_filename.substr(0, real_cwd.length()) == real_cwd)
- return real_filename.substr(real_cwd.length()+1);
+ return real_filename.substr(real_cwd.length());
const char* home = getenv("HOME");
if (home)