mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-04 23:21:28 +03:00
* vfs.c (vfs_rmstamp): Rescan the tree after the parents have
been removed. Otherwise using old data causes data corruption in some combinations (e.g. extfs inside tatfs).
This commit is contained in:
parent
6f9f431ae6
commit
24dd87b714
@ -1,3 +1,9 @@
|
||||
2003-10-30 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* vfs.c (vfs_rmstamp): Rescan the tree after the parents have
|
||||
been removed. Otherwise using old data causes data corruption
|
||||
in some combinations (e.g. extfs inside tatfs).
|
||||
|
||||
2003-10-29 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* extfs.c: Remove current_dir field, its role was purely
|
||||
|
35
vfs/vfs.c
35
vfs/vfs.c
@ -346,23 +346,26 @@ void
|
||||
vfs_rmstamp (struct vfs_class *v, vfsid id, int removeparents)
|
||||
{
|
||||
struct vfs_stamping *stamp, *st1;
|
||||
|
||||
for (stamp = stamps, st1 = NULL; stamp != NULL; st1 = stamp, stamp = stamp->next)
|
||||
if (stamp->v == v && stamp->id == id){
|
||||
if (stamp->parent != NULL){
|
||||
if (removeparents)
|
||||
vfs_rmstamp (stamp->parent->v, stamp->parent->id, 1);
|
||||
vfs_rm_parents (stamp->parent);
|
||||
}
|
||||
if (st1 == NULL){
|
||||
stamps = stamp->next;
|
||||
} else {
|
||||
st1->next = stamp->next;
|
||||
}
|
||||
g_free (stamp);
|
||||
|
||||
return;
|
||||
}
|
||||
for (stamp = stamps, st1 = NULL; stamp != NULL;
|
||||
st1 = stamp, stamp = stamp->next)
|
||||
if (stamp->v == v && stamp->id == id) {
|
||||
if (stamp->parent != NULL) {
|
||||
if (removeparents)
|
||||
vfs_rmstamp (stamp->parent->v, stamp->parent->id, 1);
|
||||
vfs_rm_parents (stamp->parent);
|
||||
stamp->parent = NULL;
|
||||
continue; /* rescan the tree */
|
||||
}
|
||||
if (st1 == NULL) {
|
||||
stamps = stamp->next;
|
||||
} else {
|
||||
st1->next = stamp->next;
|
||||
}
|
||||
g_free (stamp);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user