From d1db30a188b17b88702282cd24374f6179f2789d Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 4 Dec 2013 22:38:26 +0100 Subject: [PATCH] Fix opening files from command line Fixes: 9c4461de --- src/LyX.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/LyX.cpp b/src/LyX.cpp index b576ac05a5..99ce873b61 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -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(); -- 2.39.2