]> granicus.if.org Git - transmission/commitdiff
(trunk libT) remove the "a file disappeared!" check from readOrWriteFile().
authorJordan Lee <jordan@transmissionbt.com>
Wed, 16 Mar 2011 03:19:56 +0000 (03:19 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Wed, 16 Mar 2011 03:19:56 +0000 (03:19 +0000)
In both the reading and writing case, this is handled with human-readable errors further up the call chain.

libtransmission/inout.c

index dea0b2450499dc973e1987f18c4e1b15bec3f8fc..3bcf5adc12dedc4a7a13042beeea5d214a46bb43 100644 (file)
 #include <stdlib.h> /* realloc */
 #include <string.h> /* memcmp */
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
 #include <openssl/sha.h>
 
 #include "transmission.h"
@@ -117,18 +113,6 @@ readOrWriteBytes( tr_session       * session,
         tr_free( subpath );
     }
 
-    /* check that the file corresponding to 'fd' still exists */
-    if( fd >= 0 )
-    {
-        struct stat sb;
-
-        if( !fstat( fd, &sb ) && sb.st_nlink < 1 )
-        {
-            tr_torrentSetLocalError( tor, "Please Verify Local Data! A file disappeared: \"%s\"", file->name );
-            err = ENOENT;
-        }
-    }
-
     if( !err )
     {
         if( ioMode == TR_IO_READ ) {