]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.C
small cleanup, doxygen, formatting changes
[lyx.git] / src / support / filetools.C
index c691ebc094e526f7853b720dbd2ada4ca178b12b..f843494cddcc75deede22d4f2d656a8840207772 100644 (file)
@@ -60,13 +60,6 @@ using std::endl;
 using std::ifstream;
 using std::vector;
 
-#if 0
-using std::getenv;
-using std::isalpha;
-using std::isalnum;
-using std::popen;
-#endif
-
 extern string system_lyxdir;
 extern string build_lyxdir;
 extern string user_lyxdir;
@@ -942,12 +935,9 @@ string const AddPath(string const & path, string const & path_2)
                        buf += '/';
        }
 
-       if (!path2.empty()) {
-               string::size_type const p2start = path2.find_first_not_of('/');
-               string::size_type const p2end = path2.find_last_not_of('/');
-               string const tmp = path2.substr(p2start, p2end - p2start + 1);
-               buf += tmp + '/';
-       }
+       if (!path2.empty())
+               buf += frontStrip(strip(path2, '/'), '/') + '/';
+
        return buf;
 }