summaryrefslogtreecommitdiff
path: root/tumblerd
diff options
context:
space:
mode:
authorAli Abdallah <ali@xfce.org>2018-09-12 08:36:27 +0200
committerAli Abdallah <ali@xfce.org>2018-09-12 08:36:27 +0200
commitb833af4bb782589ad2fa6e13373b483c741924ae (patch)
treee11c4cec3397664c6a555b2c256b898bbe625d4e /tumblerd
parent493f35ee50986a2346deca35cfe8cd918ab354fb (diff)
downloadtumbler-b833af4bb782589ad2fa6e13373b483c741924ae.tar.gz
Test sparse files only on regular ones
This commit fixes #14693 to allow thumbnailing of folders.
Diffstat (limited to 'tumblerd')
-rw-r--r--tumblerd/tumbler-registry.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tumblerd/tumbler-registry.c b/tumblerd/tumbler-registry.c
index c1337af..b87e2c1 100644
--- a/tumblerd/tumbler-registry.c
+++ b/tumblerd/tumbler-registry.c
@@ -481,13 +481,14 @@ tumbler_registry_get_thumbnailer_array (TumblerRegistry *registry,
g_free (filename);
- if (!S_ISREG (sb.st_mode))
- continue;
-
- if (((TUMBLER_STAT_BLKSIZE * sb.st_blocks) / sb.st_size) < 0.8)
+ /* Test sparse files on regular ones */
+ if (S_ISREG (sb.st_mode))
{
- g_debug ("'%s' is probably a sparse file, skipping\n", tumbler_file_info_get_uri (infos[n]));
- continue;
+ if (((TUMBLER_STAT_BLKSIZE * sb.st_blocks) / sb.st_size) < 0.8)
+ {
+ g_debug ("'%s' is probably a sparse file, skipping\n", tumbler_file_info_get_uri (infos[n]));
+ continue;
+ }
}
}
else