diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-05-19 18:40:00 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-05-19 18:40:00 +0300 |
commit | ee5ad46a0eadf6e9e42868760ad2343d412614d7 (patch) | |
tree | 24bd1ff1f02246b3943d4b21aac950cba3876603 /source/blender/blenlib/intern | |
parent | 0fa4286ade52bd7268789fbec5cd2043a57cbad6 (diff) |
Fix T87621: Win32 Do Not Create Preview Thumbnails for Offline Files
This patch turns off the creation of file thumbnails for files that are
offline and therefore not fully-present on the file system. These types
of files - typically cloud-based or stored on slower backup media -
only have their contents available when actually accessed, at which
point there will be a short delay. If we allow thumbnail creation in
this state then all offline files in a folder will be downloaded just
to view a listing, which can take a long time.
Files in this state will instead get a more generic thumbnail that
still indicates file type (icon in center) and that shows offline state
will a special icon at the bottom-left.
Although this currently only affects Windows users, most of this patch
is platform-agnostic. So other platforms inherit this behavior if they
only add FILE_ATTR_OFFLINE attribute to files in this state.
See D11101 for more information.
Differential Revision: https://developer.blender.org/D11101
Reviewed by Julian Eisel
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index cb2634e6fda..5f823396ed9 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -266,7 +266,8 @@ eFileAttributes BLI_file_attributes(const char *path) if (attr & FILE_ATTRIBUTE_SPARSE_FILE) { ret |= FILE_ATTR_SPARSE_FILE; } - if (attr & FILE_ATTRIBUTE_OFFLINE) { + if (attr & FILE_ATTRIBUTE_OFFLINE || attr & FILE_ATTRIBUTE_RECALL_ON_OPEN || + attr & FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS) { ret |= FILE_ATTR_OFFLINE; } if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { |