From 73217d5e49d9ac336b897b73333476ac184d7961 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Tue, 20 Dec 2011 20:11:56 +0000 Subject: [PATCH] + small bug fix for windows --- src/common/pathTools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/pathTools.cpp b/src/common/pathTools.cpp index de93ad8e6..2e60cf061 100644 --- a/src/common/pathTools.cpp +++ b/src/common/pathTools.cpp @@ -31,13 +31,14 @@ bool isRelativePath(const string &path) { #endif } +/* Warning: the relative path must be with slashes */ string computeAbsolutePath(const string path, const string relativePath) { #ifdef _WIN32 string separator = "\\"; #else string separator = "/"; #endif - string absolutePath = path[path.length() - 1] == '/' ? path : path + "/"; + string absolutePath = path[path.length() - 1] == separator[0] ? path : path + separator; char *cRelativePath = strdup(relativePath.c_str()); char *token = strtok(cRelativePath, "/");