Stefan Schuermans commited on 2011-10-24 20:45:07
Showing 1 changed files, with 4 additions and 3 deletions.
| ... | ... |
@@ -42,14 +42,15 @@ bool File::checkModified() |
| 42 | 42 |
for not missing any modification */ |
| 43 | 43 |
Time now = Time::now(); |
| 44 | 44 |
|
| 45 |
- // get modification time |
|
| 45 |
+ // get modification/change times |
|
| 46 | 46 |
struct stat s; |
| 47 | 47 |
if (stat(m_path.c_str(), &s)) |
| 48 | 48 |
return false; // cannot stat -> silently ignore |
| 49 | 49 |
Time modified(s.st_mtime); |
| 50 |
+ Time changed(s.st_mtime); |
|
| 50 | 51 |
|
| 51 |
- // has file been modified since last check |
|
| 52 |
- bool mod = modified > m_lastCheck; |
|
| 52 |
+ // has file been modified/changed since last check |
|
| 53 |
+ bool mod = modified > m_lastCheck || changed > m_lastCheck; |
|
| 53 | 54 |
|
| 54 | 55 |
// remember "now" as last check time |
| 55 | 56 |
m_lastCheck = now; |
| 56 | 57 |