]> git.lyx.org Git - features.git/commitdiff
Fix opening files from command line
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 4 Dec 2013 21:38:26 +0000 (22:38 +0100)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 10 Dec 2013 18:19:17 +0000 (19:19 +0100)
Fixes: 9c4461de
src/LyX.cpp

index b576ac05a5e2925b4a5a7c09c09ca92c7cc005f2..99ce873b61c0394db4ea9517df9b6eb55e655a3b 100644 (file)
@@ -563,8 +563,10 @@ void LyX::execCommands()
                // if some files were specified at command-line we assume that the
                // user wants to edit *these* files and not to restore the session.
                for (size_t i = 0; i != pimpl_->files_to_load_.size(); ++i) {
+                       FileName const abs_path = 
+                               support::makeAbsPath(pimpl_->files_to_load_[i]);
                        lyx::dispatch(
-                               FuncRequest(LFUN_FILE_OPEN, pimpl_->files_to_load_[i]));
+                               FuncRequest(LFUN_FILE_OPEN, abs_path.absoluteFilePath()));
                }
                // clear this list to save a few bytes of RAM
                pimpl_->files_to_load_.clear();