[BUG] extfs bug
Pavel Roskin
proski at gnu.org
Sat Dec 7 03:11:57 UTC 2002
On Sat, 7 Dec 2002, Adam Byrtek 'alpha' wrote:
> When I copy file into an archive (tested on urar and uzip extfs) the
> file is copied, but when I try to view it, I see:
>
> Cannot view: not a regular file
>
> The problem disappears when I restart mc (I can view the same file
> without any problem), so it looks like vfs cache problem.
That's right. Another workaround - leave the archive and select Command
-> "Free VFSs now" in the menu.
> I tried to examine this issue better, but I lack deeper mc
> architecture knowlege.
I think it applies to most of us :-(
I think that get_path_mangle() should check if the archive has been
modified and reread it. If I fully disable caching (i.e. remove the for
loop), the behavior is much more reasonable (tested with ar).
One possible solution would be to mark the archive as dirty whenever any
command is issued to change it. That flag would go to struct archive in
extfs.h.
Another approach would be to use stat() and compare mtime. It would also
work if somebody else modified the archive. It's also consistent with
free_archive(). On the other hand, I don't want stat() to be called 100
times on the archive file if I'm just using "Find file". This performance
impact needs to be analyzed.
In either case, don't forget to release the resources associated with the
old archive.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list