]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_cygwin.cpp
Now that exceptions are allowed, handle gracefully the case where a Buffer temp direc...
[lyx.git] / src / support / os_cygwin.cpp
index cf57336f7dd176210c7ab29aff29db71a40779ee..cfaeb549f6330277b3de6e5b0b2c50c06bdc3530 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "support/os.h"
 
+#include "support/FileName.h"
 #include "support/lstrings.h"
 #include "support/debug.h"
 
@@ -187,7 +188,7 @@ string latex_path(string const & p)
        // on windows_style_tex_paths_), but we use always forward slashes,
        // since it gets written into a .tex file.
 
-       if (windows_style_tex_paths_ && is_absolute_path(p)) {
+       if (windows_style_tex_paths_ && FileName(p).isAbsolute()) {
                string dos_path = convert_path(p, PathStyle(windows));
                LYXERR(Debug::LATEX, "<Path correction for LaTeX> ["
                        << p << "]->>[" << dos_path << ']');
@@ -198,18 +199,6 @@ string latex_path(string const & p)
 }
 
 
-bool is_absolute_path(string const & p)
-{
-       if (p.empty())
-               return false;
-
-       bool isDosPath = (p.length() > 1 && p[1] == ':');
-       bool isUnixPath = (p[0] == '/');
-
-       return isDosPath || isUnixPath;
-}
-
-
 // returns a string suitable to be passed to popen when
 // reading a pipe
 char const * popen_read_mode()