diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-07 22:31:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-07 22:31:43 +0100 |
| commit | 15d98128799c2902a3fc046792d1456a275b756b (patch) | |
| tree | f982bc98f956c88ee16175fbef11dcef4cc48947 /src/lib/types.cc | |
| parent | f09a7994fb374d4a6dde0224eb1dfb5cbb83bc0b (diff) | |
Be more defensive when calling boost::filesystem::last_write_time.
Diffstat (limited to 'src/lib/types.cc')
| -rw-r--r-- | src/lib/types.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/types.cc b/src/lib/types.cc index 3586cdb93..b7632a984 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -220,7 +220,9 @@ CPLSummary::CPLSummary (boost::filesystem::path p) } } - last_write_time = boost::filesystem::last_write_time (p); + boost::system::error_code ec; + auto last_write = boost::filesystem::last_write_time (p, ec); + last_write_time = ec ? 0 : last_write; } |
