Fix for another data loss bug
Pavel Machek
pavel at suse.cz
Fri Aug 17 21:15:27 UTC 2001
Hi!
> > : > : "Safe save" and "Do backups" don't work on the remote VFS. Fixing it
> > : > : properly is quite hard, because it requires on implementation of rename()
> > : > : on VFS.
> >
> > What is wrong with rename on VFS? It is work well on ftpfs and smbfs as far
> > as I know. And I think it is ok on fish.
>
> I meant the rename() function that is used in mcedit. There is no
> mc_rename() in VFS - it is declared in vfs.h but not implemented. The
> mcedit code seems to rely on the atomic rename() to implement "Safe
> Save".
There is mc_rename... Or you have simple bug to fix. Many low-level
vfs-es implement it and it is supposed to be there. Notice last line:
pavel at bug:~/gnome/mc/vfs$ grep rename *.c
fish.c:FISH_OP(rename, XTEST, "#RENAME /%s /%s\nmv \"/%s\" \"/%s\";
echo '### 000'" );
fish.c: fish_rename, /* rename */
ftpfs.c:static int ftpfs_rename (vfs *me, char *path1, char *path2)
ftpfs.c: ftpfs_rename,
local.c:local_rename (vfs *me, char *a, char *b)
local.c: return rename (a, b);
local.c: local_rename,
mcfs.c:static int mcfs_rename (vfs *me, char *a, char *b)
mcfs.c: mcfs_rename,
mcserv.c:void do_rename (void)
mcserv.c: status = rename (f1, f2);
mcserv.c: { "rename", do_rename },
smbfs.c: *p = 0; /* cut
off dir/files: sharename only */
smbfs.c:smbfs_rename (vfs *me, char *a, char *b)
smbfs.c: if (!cli_rename(sc->cli, ra, rb)) {
smbfs.c: smbfs_rename,
vfs.c:MC_RENAMEOP (rename)
Pavel
--
I'm pavel at ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss at linmodems.org
More information about the mc-devel
mailing list