mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: use second accuracy to detect file change outside
This commit is contained in:
parent
da5218452f
commit
ed44ec4ee8
@ -112,7 +112,7 @@ bool VFile::isInternalImageFolder(const QString &p_path) const
|
|||||||
bool VFile::isChangedOutside() const
|
bool VFile::isChangedOutside() const
|
||||||
{
|
{
|
||||||
QDateTime lm = QFileInfo(fetchPath()).lastModified();
|
QDateTime lm = QFileInfo(fetchPath()).lastModified();
|
||||||
return lm != m_lastModified;
|
return lm.toSecsSinceEpoch() != m_lastModified.toSecsSinceEpoch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VFile::reload()
|
void VFile::reload()
|
||||||
|
@ -339,6 +339,7 @@ bool VMdTab::saveFile()
|
|||||||
QMessageBox::Ok, QMessageBox::Ok, this);
|
QMessageBox::Ok, QMessageBox::Ok, this);
|
||||||
ret = false;
|
ret = false;
|
||||||
} else {
|
} else {
|
||||||
|
m_checkFileChange = false;
|
||||||
m_editor->saveFile();
|
m_editor->saveFile();
|
||||||
ret = m_file->save();
|
ret = m_file->save();
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user