diff --git a/src/viewer/mcviewer.c b/src/viewer/mcviewer.c
index 93908f3..63b9313 100644
a
|
b
|
mcview_load (mcview_t * view, const char *command, const char *file, int start_l |
375 | 375 | if (view->magic_mode && (type != COMPRESSION_NONE)) |
376 | 376 | { |
377 | 377 | char *tmp_filename; |
| 378 | vfs_path_t *vpath1 = NULL; |
| 379 | int fd1; |
378 | 380 | |
379 | | vfs_path_free (view->filename_vpath); |
380 | 381 | tmp_filename = g_strconcat (file, decompress_extension (type), (char *) NULL); |
381 | | view->filename_vpath = vfs_path_from_str (tmp_filename); |
| 382 | vpath1 = vfs_path_from_str (tmp_filename); |
| 383 | fd1 = mc_open (vpath1, O_RDONLY | O_NONBLOCK); |
| 384 | if (fd1 == -1) |
| 385 | { |
| 386 | g_snprintf (tmp, sizeof (tmp), _("Cannot open \"%s\" in magic mode\n%s"), |
| 387 | file, unix_error_string (errno)); |
| 388 | mcview_show_error (view, tmp); |
| 389 | } |
| 390 | else |
| 391 | { |
| 392 | mc_close (fd); |
| 393 | fd = fd1; |
| 394 | mc_fstat (fd, &st); |
| 395 | } |
| 396 | vfs_path_free (vpath1); |
| 397 | |
382 | 398 | g_free (tmp_filename); |
383 | 399 | } |
384 | 400 | mcview_set_datasource_file (view, fd, &st); |