#include <config.h>
#include "support/os.h"
-#include "support/lstrings.h"
-#include "debug.h"
+#include "support/FileName.h"
+#include "support/lstrings.h"
+#include "support/debug.h"
#include <windows.h>
#include <io.h>
#include <sys/cygwin.h>
-using std::string;
-
+using namespace std;
namespace lyx {
namespace support {
// 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 << ']');
}
-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()