mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Now LyX correctly asks to retrieve non-existing file from GIT repo only if the file is actually registered in repo.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
This commit is contained in:
parent
8e5a020c0c
commit
26dd4d0c15
@ -1844,15 +1844,20 @@ FileName const GIT::findFile(FileName const & file)
|
||||
file.onlyPath());
|
||||
if (found)
|
||||
{
|
||||
// The output is empty for file names NOT in repo.
|
||||
// The output contains a line starting with "??" for unknown
|
||||
// files, no line for known unmodified files and a line
|
||||
// starting with "M" or something else for modified/deleted
|
||||
// etc. files.
|
||||
ifstream ifs(tmpf.toFilesystemEncoding().c_str());
|
||||
string test;
|
||||
if ((ifs >> test))
|
||||
found = (test != "??");
|
||||
// else is no error
|
||||
if (tmpf.isFileEmpty())
|
||||
found = false;
|
||||
else {
|
||||
ifstream ifs(tmpf.toFilesystemEncoding().c_str());
|
||||
string test;
|
||||
if ((ifs >> test))
|
||||
found = (test != "??");
|
||||
// else is no error
|
||||
}
|
||||
}
|
||||
tmpf.removeFile();
|
||||
LYXERR(Debug::LYXVC, "GIT control: " << (found ? "enabled" : "disabled"));
|
||||
|
Loading…
Reference in New Issue
Block a user