]> granicus.if.org Git - transmission/commitdiff
(trunk libT) possible fix for gn0s1s' "file not found" error message
authorCharles Kerr <charles@transmissionbt.com>
Tue, 26 Jan 2010 21:41:40 +0000 (21:41 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Tue, 26 Jan 2010 21:41:40 +0000 (21:41 +0000)
libtransmission/inout.c

index 3d2a26ba8dfe7f1d1d98714a8b0b74c2e07391b7..f32e8dd23d47523e230462396a69ec28a35da807 100644 (file)
@@ -240,7 +240,8 @@ readOrWritePiece( tr_torrent       * tor,
         ++fileIndex;
         fileOffset = 0;
 
-        if( err ) {
+        if( ( err != 0 ) && (ioMode == TR_IO_WRITE ) )
+        {
             char * path = tr_buildPath( tor->downloadDir, file->name, NULL );
             tr_torrentSetLocalError( tor, "%s (%s)", tr_strerror( err ), path );
             tr_free( path );