Ticket #3034: cannot enter into zip archive in tar one.

How to reproduce:
1. Create archive: touch a.txt && zip a.zip a.txt && tar cf a.tar a.zip
2. Press "Enter" on a.tar to enter into archive. Success.
3. Press "Enter" on a.zip to enter into archive. Nothing happens.

(regex_check_type): don't remove temporary file before read data from it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2013-07-11 10:51:48 +04:00
parent e6eddc4ab7
commit 8cb80dcc9c

View File

@ -679,10 +679,10 @@ regex_check_type (const vfs_path_t * filename_vpath, const char *ptr, int *have_
} }
#endif /* HAVE_CHARSET */ #endif /* HAVE_CHARSET */
mc_ungetlocalcopy (filename_vpath, localfile_vpath, FALSE);
got_data = get_file_type_local (localfile_vpath, content_string, sizeof (content_string)); got_data = get_file_type_local (localfile_vpath, content_string, sizeof (content_string));
mc_ungetlocalcopy (filename_vpath, localfile_vpath, FALSE);
if (got_data > 0) if (got_data > 0)
{ {
char *pp; char *pp;