aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_common.c')
-rw-r--r--src/fs/gnunet-fs-gtk_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fs/gnunet-fs-gtk_common.c b/src/fs/gnunet-fs-gtk_common.c
index 90077f52..a987b25a 100644
--- a/src/fs/gnunet-fs-gtk_common.c
+++ b/src/fs/gnunet-fs-gtk_common.c
@@ -210,6 +210,11 @@ GNUNET_FS_GTK_mmap_and_scan (const char *filename,
210 GNUNET_break (0); 210 GNUNET_break (0);
211 return GNUNET_SYSERR; 211 return GNUNET_SYSERR;
212 } 212 }
213 if (0 == fsize)
214 {
215 /* empty file, cannot be a directory */
216 return GNUNET_SYSERR;
217 }
213 if (NULL == (fh = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ, 218 if (NULL == (fh = GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ,
214 GNUNET_DISK_PERM_NONE))) 219 GNUNET_DISK_PERM_NONE)))
215 { 220 {