Edwin Leuven wrote:
Enrico Forestieri wrote:
As I already said, you should complain with Microsoft because that
is a cmd.exe bug ;-)

i know, and i am always more than happy to blame microsoft ;-) but i was wondering whether there are ways to call programs (not using cmd.exe) where we don't run into this problem.

but maybe things are just the way they are, but nice it ain't and it seems a bit odd that all software can live on our network drives but not lyx

I think I fixed that temporarily in trunk. A cleaner fix will be to port this to FileName.

This fix is applicable to branch Juergen.

Abdel.

Author: younes
Date: Mon Dec 17 08:50:35 2007
New Revision: 22179

URL: http://www.lyx.org/trac/changeset/22179
Log:
Fix network drive access.


Modified:
    lyx-devel/trunk/src/support/os_win32.cpp

Modified: lyx-devel/trunk/src/support/os_win32.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/support/os_win32.cpp?rev=22179
==============================================================================
--- lyx-devel/trunk/src/support/os_win32.cpp (original)
+++ lyx-devel/trunk/src/support/os_win32.cpp Mon Dec 17 08:50:35 2007
@@ -258,15 +258,28 @@
 // followed by a colon. Because a colon is not valid in pathes in Unix
 // and at another location in Win32 testing just for the existance
 // of the colon in the 2nd position seems to be enough!
+// FIXME: Port to FileName!
 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;
+       if (p[0] == '/')
+               // Unix style.
+               return true;
+
+       if (p.length() <= 1)
+               return false;
+
+       if (p[1] == ':')
+               // 'X:\' style.
+               return true;
+
+       if (p[0] == '\\' && p[1] == '\\')
+               // Network folder style: '\\server\share'
+               return true;
+
+       return false;
 }








Reply via email to