mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
Backport fix for 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.
(cherry picked from commit 93ebb7a863
)
This commit is contained in:
parent
b5d7ebd45c
commit
3a3f6c838c
@ -2624,7 +2624,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() + "/";
|
||||
}
|
||||
|
||||
|
||||
|
@ -130,6 +130,9 @@ What's new
|
||||
|
||||
- Fixed an infinite loop when pasting '\\ ' into math (bug 8089).
|
||||
|
||||
- Fixed problem when setting working directory on Windows to root of a
|
||||
disk, e.g., C:\ (bug 7982).
|
||||
|
||||
- Don't reset the selected format each time we click into a new paragraph
|
||||
in View->Source (bug 7997).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user