mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
* vfs.c (vfs_add_noncurrent_stamps): Call vfs_rm_parents() at
the end. Change all callers not to call it. (vfs_rm_parents): Make static.
This commit is contained in:
parent
3fb8e46501
commit
6e6fd9b352
@ -1,5 +1,9 @@
|
|||||||
2003-10-11 Pavel Roskin <proski@gnu.org>
|
2003-10-11 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* vfs.c (vfs_add_noncurrent_stamps): Call vfs_rm_parents() at
|
||||||
|
the end. Change all callers not to call it.
|
||||||
|
(vfs_rm_parents): Make static.
|
||||||
|
|
||||||
* direntry.c: Don't use vfs_local_fs directly, use VFSF_LOCAL.
|
* direntry.c: Don't use vfs_local_fs directly, use VFSF_LOCAL.
|
||||||
* extfs.c: Likewise.
|
* extfs.c: Likewise.
|
||||||
* vfs.c (vfs_addstamp): Likewise.
|
* vfs.c (vfs_addstamp): Likewise.
|
||||||
|
@ -471,7 +471,6 @@ vfs_s_stamp_me (vfs *me, struct vfs_s_super *psup, char *fs_name)
|
|||||||
parent->id = (*v->getid) (v, fs_name, &(parent->parent));
|
parent->id = (*v->getid) (v, fs_name, &(parent->parent));
|
||||||
}
|
}
|
||||||
vfs_add_noncurrent_stamps (me, (vfsid) psup, parent);
|
vfs_add_noncurrent_stamps (me, (vfsid) psup, parent);
|
||||||
vfs_rm_parents (parent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@ -896,7 +895,6 @@ vfs_s_close (void *fh)
|
|||||||
parent->id = (*v->getid) (v, FH_SUPER->name, &(parent->parent));
|
parent->id = (*v->getid) (v, FH_SUPER->name, &(parent->parent));
|
||||||
}
|
}
|
||||||
vfs_add_noncurrent_stamps (me, (vfsid) (FH_SUPER), parent);
|
vfs_add_noncurrent_stamps (me, (vfsid) (FH_SUPER), parent);
|
||||||
vfs_rm_parents (parent);
|
|
||||||
}
|
}
|
||||||
if (FH->linear == LS_LINEAR_OPEN)
|
if (FH->linear == LS_LINEAR_OPEN)
|
||||||
MEDATA->linear_close (me, fh);
|
MEDATA->linear_close (me, fh);
|
||||||
|
@ -462,7 +462,6 @@ get_path_mangle (char *inname, struct archive **archive, int is_dir,
|
|||||||
parent->id = (*v->getid) (v, archive_name, &(parent->parent));
|
parent->id = (*v->getid) (v, archive_name, &(parent->parent));
|
||||||
}
|
}
|
||||||
vfs_add_noncurrent_stamps (&vfs_extfs_ops, (vfsid) parc, parent);
|
vfs_add_noncurrent_stamps (&vfs_extfs_ops, (vfsid) parc, parent);
|
||||||
vfs_rm_parents (parent);
|
|
||||||
}
|
}
|
||||||
return_success:
|
return_success:
|
||||||
*archive = parc;
|
*archive = parc;
|
||||||
@ -763,7 +762,6 @@ extfs_close (void *data)
|
|||||||
}
|
}
|
||||||
vfs_add_noncurrent_stamps (&vfs_extfs_ops, (vfsid) (file->archive),
|
vfs_add_noncurrent_stamps (&vfs_extfs_ops, (vfsid) (file->archive),
|
||||||
parent);
|
parent);
|
||||||
vfs_rm_parents (parent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
|
@ -137,7 +137,6 @@ redirect (vfs *me, char *name)
|
|||||||
head = cur;
|
head = cur;
|
||||||
|
|
||||||
vfs_add_noncurrent_stamps (&vfs_sfs_ops, (vfsid) head, NULL);
|
vfs_add_noncurrent_stamps (&vfs_sfs_ops, (vfsid) head, NULL);
|
||||||
vfs_rm_parents (NULL);
|
|
||||||
|
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
16
vfs/vfs.c
16
vfs/vfs.c
@ -331,7 +331,7 @@ vfs_stamp (vfs *v, vfsid id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
vfs_rm_parents (struct vfs_stamping *stamp)
|
vfs_rm_parents (struct vfs_stamping *stamp)
|
||||||
{
|
{
|
||||||
struct vfs_stamping *parent;
|
struct vfs_stamping *parent;
|
||||||
@ -765,8 +765,8 @@ is_parent (vfs * nvfs, vfsid nvfsid, struct vfs_stamping *parent)
|
|||||||
return (stamp ? 1 : 0);
|
return (stamp ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
vfs_add_noncurrent_stamps (vfs * oldvfs, vfsid oldvfsid, struct vfs_stamping *parent)
|
_vfs_add_noncurrent_stamps (vfs *oldvfs, vfsid oldvfsid, struct vfs_stamping *parent)
|
||||||
{
|
{
|
||||||
vfs *nvfs, *n2vfs, *n3vfs;
|
vfs *nvfs, *n2vfs, *n3vfs;
|
||||||
vfsid nvfsid, n2vfsid, n3vfsid;
|
vfsid nvfsid, n2vfsid, n3vfsid;
|
||||||
@ -845,6 +845,14 @@ vfs_add_noncurrent_stamps (vfs * oldvfs, vfsid oldvfsid, struct vfs_stamping *pa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
vfs_add_noncurrent_stamps (vfs *oldvfs, vfsid oldvfsid,
|
||||||
|
struct vfs_stamping *parent)
|
||||||
|
{
|
||||||
|
_vfs_add_noncurrent_stamps (oldvfs, oldvfsid, parent);
|
||||||
|
vfs_rm_parents (parent);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vfs_stamp_path (char *path)
|
vfs_stamp_path (char *path)
|
||||||
{
|
{
|
||||||
@ -916,7 +924,6 @@ mc_chdir (char *path)
|
|||||||
|
|
||||||
/* This function uses the new current_dir implicitly */
|
/* This function uses the new current_dir implicitly */
|
||||||
vfs_add_noncurrent_stamps (old_vfs, old_vfsid, parent);
|
vfs_add_noncurrent_stamps (old_vfs, old_vfsid, parent);
|
||||||
vfs_rm_parents (parent);
|
|
||||||
|
|
||||||
/* Sometimes we assume no trailing slash on cwd */
|
/* Sometimes we assume no trailing slash on cwd */
|
||||||
if (*current_dir) {
|
if (*current_dir) {
|
||||||
@ -1868,5 +1875,4 @@ vfs_release_path (const char *dir)
|
|||||||
oldvfs = vfs_get_class (dir);
|
oldvfs = vfs_get_class (dir);
|
||||||
oldvfsid = vfs_ncs_getid (oldvfs, dir, &parent);
|
oldvfsid = vfs_ncs_getid (oldvfs, dir, &parent);
|
||||||
vfs_add_noncurrent_stamps (oldvfs, oldvfsid, parent);
|
vfs_add_noncurrent_stamps (oldvfs, oldvfsid, parent);
|
||||||
vfs_rm_parents (parent);
|
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,6 @@ void vfs_shut (void);
|
|||||||
|
|
||||||
struct vfs_class *vfs_get_class (const char *path);
|
struct vfs_class *vfs_get_class (const char *path);
|
||||||
vfs *vfs_split (const char *path, char **inpath, char **op);
|
vfs *vfs_split (const char *path, char **inpath, char **op);
|
||||||
void vfs_rm_parents (struct vfs_stamping *stamp);
|
|
||||||
char *vfs_path (const char *path);
|
char *vfs_path (const char *path);
|
||||||
char *vfs_strip_suffix_from_filename (const char *filename);
|
char *vfs_strip_suffix_from_filename (const char *filename);
|
||||||
char *vfs_canon (const char *path);
|
char *vfs_canon (const char *path);
|
||||||
|
Loading…
Reference in New Issue
Block a user