The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 93ebb7a863377f6dbcaf724972b747b5c3f20c24
Author: Enrico Forestieri <for...@lyx.org>
Date:   Mon May 14 13:08:30 2012 +0200

    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.

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 1dc5d59..ad119bd 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -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() + "/";
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 src/Buffer.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to