mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Embedding: save checksum of the bundled file, not content.lyx (to avoid file externally modified warnings).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22394 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
81f48ded87
commit
2a69b32fa4
@ -672,6 +672,8 @@ bool Buffer::readFile(FileName const & filename)
|
||||
FileName lyxfile(addName(temppath(), "content.lyx"));
|
||||
// if both manifest.txt and file.lyx exist, this is am embedded file
|
||||
if (lyxfile.exists()) {
|
||||
// if in bundled format, save checksum of the compressed file, not content.lyx
|
||||
saveCheckSum(filename);
|
||||
params().embedded = true;
|
||||
fname = lyxfile;
|
||||
}
|
||||
@ -908,12 +910,8 @@ bool Buffer::writeFile(FileName const & fname) const
|
||||
}
|
||||
|
||||
removeAutosaveFile(d->filename.absFilename());
|
||||
saveCheckSum(d->filename);
|
||||
message(str + _(" done."));
|
||||
|
||||
if (!params().embedded)
|
||||
return true;
|
||||
|
||||
if (params().embedded) {
|
||||
message(str + _(" writing embedded files!."));
|
||||
// if embedding is enabled, write file.lyx and all the embedded files
|
||||
// to the zip file fname.
|
||||
@ -921,7 +919,10 @@ bool Buffer::writeFile(FileName const & fname) const
|
||||
message(str + _(" could not write embedded files!."));
|
||||
return false;
|
||||
}
|
||||
message(str + _(" error while writing embedded files."));
|
||||
}
|
||||
saveCheckSum(d->filename);
|
||||
message(str + _(" done."));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user