+ if (fd >= 0 || fd == -2)
+ {
+ file_found = ENCODE_FILE (file_found);
+ if (fd == -2)
+ {
+ /* The file exists locally, but has a file handler. (This
+ happens, e.g., under Auto Image File Mode.) 'openp'
+ didn't open the file, so we should, because the caller
+ expects that. */
+ fd = emacs_open (SSDATA (file_found), O_RDONLY | O_BINARY, 0);
+ }
+ }
+ else /* fd < 0, but not -2 */