* image.c (x_find_image_file): Don't close a remote file handle.
authorAndreas Schwab <schwab@linux-m68k.org>
Fri, 12 Jul 2013 09:02:30 +0000 (11:02 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Fri, 12 Jul 2013 09:02:30 +0000 (11:02 +0200)
src/ChangeLog
src/image.c

index 20c8be6..7503127 100644 (file)
@@ -1,3 +1,7 @@
+2013-07-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * image.c (x_find_image_file): Don't close a remote file handle.
+
 2013-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix races with threads and file descriptors.
index 0938a11..00d1836 100644 (file)
@@ -2260,7 +2260,8 @@ x_find_image_file (Lisp_Object file)
   else
     {
       file_found = ENCODE_FILE (file_found);
-      emacs_close (fd);
+      if (fd != -2)
+       emacs_close (fd);
     }
 
   return file_found;