mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* extfs.c (read_archive): Free archive if the "list" command
returned non-zero, return -1. Initial implemntation from Adam Byrtek <alpha@debian.org>
This commit is contained in:
parent
10391e82cf
commit
9dc4fc6342
@ -1,3 +1,9 @@
|
||||
2002-12-25 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* extfs.c (read_archive): Free archive if the "list" command
|
||||
returned non-zero, return -1.
|
||||
Initial implemntation from Adam Byrtek <alpha@debian.org>
|
||||
|
||||
2002-12-24 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* direntry.c (vfs_s_open): If the filesystem is read-only,
|
||||
|
13
vfs/extfs.c
13
vfs/extfs.c
@ -82,6 +82,7 @@ static struct entry *
|
||||
find_entry (struct entry *dir, char *name, int make_dirs, int make_file);
|
||||
static int extfs_which (vfs *me, char *path);
|
||||
static void remove_entry (struct entry *e);
|
||||
static void extfs_free (vfsid id);
|
||||
|
||||
static struct archive *first_archive = NULL;
|
||||
static int my_errno = 0;
|
||||
@ -276,7 +277,7 @@ open_archive (int fstype, char *name, struct archive **pparc)
|
||||
|
||||
/*
|
||||
* Main loop for reading an archive.
|
||||
* Returns 0 on success, -1 on error.
|
||||
* Return 0 on success, -1 on error.
|
||||
*/
|
||||
static int
|
||||
read_archive (int fstype, char *name, struct archive **pparc)
|
||||
@ -392,7 +393,15 @@ read_archive (int fstype, char *name, struct archive **pparc)
|
||||
g_free (current_link_name);
|
||||
}
|
||||
}
|
||||
pclose (extfsd);
|
||||
|
||||
/* Check if extfs 'list' returned 0 */
|
||||
if (pclose (extfsd) != 0) {
|
||||
g_free (buffer);
|
||||
extfs_free (current_archive);
|
||||
close_error_pipe (1, _("Inconsistent extfs archive"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
close_error_pipe (1, NULL);
|
||||
#ifdef SCO_FLAVOR
|
||||
waitpid (-1, NULL, WNOHANG);
|
||||
|
Loading…
Reference in New Issue
Block a user