Skip to content

Commit

Permalink
bug-fix: use second accuracy to detect file change outside
Browse files Browse the repository at this point in the history
  • Loading branch information
tamlok committed Feb 26, 2018
1 parent da52184 commit ed44ec4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool VFile::isInternalImageFolder(const QString &p_path) const
bool VFile::isChangedOutside() const
{
QDateTime lm = QFileInfo(fetchPath()).lastModified();
return lm != m_lastModified;
return lm.toSecsSinceEpoch() != m_lastModified.toSecsSinceEpoch();
}

void VFile::reload()
Expand Down
1 change: 1 addition & 0 deletions src/vmdtab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ bool VMdTab::saveFile()
QMessageBox::Ok, QMessageBox::Ok, this);
ret = false;
} else {
m_checkFileChange = false;
m_editor->saveFile();
ret = m_file->save();
if (!ret) {
Expand Down

0 comments on commit ed44ec4

Please sign in to comment.