diff --git a/src/tl/tlFileSystemWatcher.cc b/src/tl/tlFileSystemWatcher.cc index 17c262e0e..58f52eec1 100644 --- a/src/tl/tlFileSystemWatcher.cc +++ b/src/tl/tlFileSystemWatcher.cc @@ -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::iterator i = m_files.find (path); if (i != m_files.end ()) { i->second.refcount += 1;