Author: grothoff Date: 2008-02-17 23:23:55 -0700 (Sun, 17 Feb 2008) New Revision: 6369
Modified: GNUnet/src/applications/fs/gap/ondemand.c Log: better Modified: GNUnet/src/applications/fs/gap/ondemand.c =================================================================== --- GNUnet/src/applications/fs/gap/ondemand.c 2008-02-18 06:19:30 UTC (rev 6368) +++ GNUnet/src/applications/fs/gap/ondemand.c 2008-02-18 06:23:55 UTC (rev 6369) @@ -468,15 +468,16 @@ GNUNET_FS_ONDEMAND_test_indexed_file (GNUNET_Datastore_ServiceAPI * datastore, const GNUNET_HashCode * fileId) { + struct stat filestat; char *fn; - int fd; fn = get_indexed_filename (fileId); - fd = GNUNET_disk_file_open (coreAPI->ectx, fn, O_RDONLY); + if (0 != STAT(fn, &filestat)) + { + GNUNET_free (fn); + return GNUNET_NO; + } GNUNET_free (fn); - if (fd == -1) - return GNUNET_NO; - CLOSE (fd); return GNUNET_YES; } _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn