mirror of https://github.com/KLayout/klayout.git
File watcher: ignore missing files/folders to prevent 'deleted' events later.
This commit is contained in:
parent
2dd03c0e37
commit
9c2c3301cf
|
|
@ -85,11 +85,13 @@ FileSystemWatcher::add_file (const std::string &path)
|
|||
QDateTime time;
|
||||
|
||||
QFileInfo fi (tl::to_qstring (path));
|
||||
if (fi.exists ()) {
|
||||
size = size_t (fi.size ());
|
||||
time = fi.lastModified ();
|
||||
if (! fi.exists () || ! fi.isReadable ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
size = size_t (fi.size ());
|
||||
time = fi.lastModified ();
|
||||
|
||||
std::map<std::string, FileEntry>::iterator i = m_files.find (path);
|
||||
if (i != m_files.end ()) {
|
||||
i->second.refcount += 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue