mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
Fix bug #7982: LyX does not work if working directory a hard disk drive like D:\
In this case, the working dir has already a slash at the end. Appending another one would result in a path ending with a double slash, which has a special meaning when used in TEXINPUTS (all subdirs would be recursively scanned). So, avoid doing that.
This commit is contained in:
parent
207d7e4ada
commit
93ebb7a863
@ -2713,7 +2713,11 @@ string Buffer::absFileName() const
|
||||
|
||||
string Buffer::filePath() const
|
||||
{
|
||||
return d->filename.onlyPath().absFileName() + "/";
|
||||
int last = d->filename.onlyPath().absFileName().length() - 1;
|
||||
|
||||
return d->filename.onlyPath().absFileName()[last] == '/'
|
||||
? d->filename.onlyPath().absFileName()
|
||||
: d->filename.onlyPath().absFileName() + "/";
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user