summaryrefslogtreecommitdiffstats
path: root/src/uscxml/util/URL.cpp
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-05-12 21:03:54 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-05-12 21:03:54 (GMT)
commit11e7301fb1f86a35e35072c8e4753095d28dc43c (patch)
treebf05b7622966265a26cc5f5f3d7a8a7d05fe4aed /src/uscxml/util/URL.cpp
parent3cfb5df8f3b0571a529d05e51218eb9f4fdc1930 (diff)
downloaduscxml-11e7301fb1f86a35e35072c8e4753095d28dc43c.zip
uscxml-11e7301fb1f86a35e35072c8e4753095d28dc43c.tar.gz
uscxml-11e7301fb1f86a35e35072c8e4753095d28dc43c.tar.bz2
Builds and links and tests ok on linux now
Diffstat (limited to 'src/uscxml/util/URL.cpp')
-rw-r--r--src/uscxml/util/URL.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp
index ad271d5..a576f8b 100644
--- a/src/uscxml/util/URL.cpp
+++ b/src/uscxml/util/URL.cpp
@@ -138,10 +138,10 @@ URL URLImpl::resolveWithCWD(URLImpl* relative) {
if (!getcwd(currPath, sizeof(currPath))) {
ERROR_PLATFORM_THROW("Cannot get current working directory");
}
- currPath[sizeof(currPath) - 1] = '\0'; /* not really required */
+ currPath[sizeof(currPath) - 1] = '\0'; /* not really required? */
-
- std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath));
+ // without the trailing slash, last component is assumed a file
+ std::shared_ptr<URLImpl> cwdURL(new URLImpl(std::string("file://") + currPath + PATH_SEPERATOR));
return resolve(relative, cwdURL.get());
}