mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 13:04:58 +00:00
Fix network drive access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22179 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e7bb71ff4e
commit
2f49534d3d
@ -258,15 +258,28 @@ string latex_path(string const & p)
|
|||||||
// followed by a colon. Because a colon is not valid in pathes in Unix
|
// 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
|
// and at another location in Win32 testing just for the existance
|
||||||
// of the colon in the 2nd position seems to be enough!
|
// of the colon in the 2nd position seems to be enough!
|
||||||
|
// FIXME: Port to FileName!
|
||||||
bool is_absolute_path(string const & p)
|
bool is_absolute_path(string const & p)
|
||||||
{
|
{
|
||||||
if (p.empty())
|
if (p.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool isDosPath = (p.length() > 1 && p[1] == ':');
|
if (p[0] == '/')
|
||||||
bool isUnixPath = (p[0] == '/');
|
// Unix style.
|
||||||
|
return true;
|
||||||
|
|
||||||
return isDosPath || isUnixPath;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user