diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-04-28 15:14:33 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-04-28 15:14:33 -0700 |
commit | 91aadab3dda85cf51b7c6d89b7e70f32bd437e5b (patch) | |
tree | 83795d0565e567f04b61ef4493c079c25efa4686 /wildcard.cpp | |
parent | c3425bc55f9b4c627519e49d8c29a7d4abde2019 (diff) |
Enhance file_id_t to have richer information, to guard against inode
recycling on Linux filesystems
Diffstat (limited to 'wildcard.cpp')
-rw-r--r-- | wildcard.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wildcard.cpp b/wildcard.cpp index 2b93561b..3ec1a8e5 100644 --- a/wildcard.cpp +++ b/wildcard.cpp @@ -971,7 +971,7 @@ static int wildcard_expand_internal(const wchar_t *wc, // Insert a "file ID" into visited_files // If the insertion fails, we've already visited this file (i.e. a symlink loop) // If we're not recursive, insert anyways (in case we loop back around in a future recursive segment), but continue on; the idea being that literal path components should still work - const file_id_t file_id(buf.st_dev, buf.st_ino); + const file_id_t file_id = file_id_t::file_id_from_stat(&buf); if (S_ISDIR(buf.st_mode) && (visited_files.insert(file_id).second || ! is_recursive)) { new_dir.push_back(L'/'); |