From 8cb80dcc9c0c2f36111dd439f3e415cec58f7ffa Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Thu, 11 Jul 2013 10:51:48 +0400 Subject: [PATCH] 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 --- src/filemanager/ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filemanager/ext.c b/src/filemanager/ext.c index 4b3ed1ff7..c5acd3630 100644 --- a/src/filemanager/ext.c +++ b/src/filemanager/ext.c @@ -679,10 +679,10 @@ regex_check_type (const vfs_path_t * filename_vpath, const char *ptr, int *have_ } #endif /* HAVE_CHARSET */ - mc_ungetlocalcopy (filename_vpath, localfile_vpath, FALSE); - got_data = get_file_type_local (localfile_vpath, content_string, sizeof (content_string)); + mc_ungetlocalcopy (filename_vpath, localfile_vpath, FALSE); + if (got_data > 0) { char *pp;