diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-05-27 03:55:14 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-05-27 03:55:14 (GMT) |
commit | 6742ad55f4cf335fc767ab65784aab81e06b61d0 (patch) | |
tree | 53bf1b3661a8d0d894487d20906b26e498158649 /src/PlatformUtils.cc | |
parent | 53e778af703e40e91c2021d4ab12f8d30e14bd60 (diff) |
fix buggy string init. remove debug string
Diffstat (limited to 'src/PlatformUtils.cc')
-rw-r--r-- | src/PlatformUtils.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PlatformUtils.cc b/src/PlatformUtils.cc index 47569b0..5dd007d 100644 --- a/src/PlatformUtils.cc +++ b/src/PlatformUtils.cc @@ -7,7 +7,7 @@ bool PlatformUtils::createLibraryPath() bool OK = false; try { if (!fs::exists(fs::path(path))) { - PRINTB("Creating library folder %s", path ); + //PRINTB("Creating library folder %s", path ); OK = fs::create_directories( path ); } if (!OK) { @@ -23,11 +23,14 @@ std::string PlatformUtils::libraryPath() { fs::path path; try { - path = boosty::canonical(fs::path(PlatformUtils::documentsPath())); + std::string pathstr = PlatformUtils::documentsPath(); + if (pathstr=="") return ""; + path = boosty::canonical(fs::path( pathstr )); + //PRINTB("path size %i",boosty::stringy(path).size()); + //PRINTB("lib path found: [%s]", path ); if (path.empty()) return ""; path /= "OpenSCAD"; path /= "libraries"; - //PRINTB("path size %i",boosty::stringy(path).size()); //PRINTB("Appended path %s", path ); //PRINTB("Exists: %i", fs::exists(path) ); } catch (const fs::filesystem_error& ex) { |