From ebf1bcfa3391fba9310449097190105107e2914b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 2 Apr 2003 22:25:00 +0000 Subject: [PATCH] * edit.c (edit_load_file): Use vfs_file_is_local(), not vfs_current_is_local(). * editlock.c (edit_lock_file): Disable locking on VFS. --- edit/ChangeLog | 6 ++++++ edit/edit.c | 3 +-- edit/editlock.c | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/edit/ChangeLog b/edit/ChangeLog index 3ba605bc9..4df9e98c2 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,3 +1,9 @@ +2003-04-02 Pavel Roskin + + * edit.c (edit_load_file): Use vfs_file_is_local(), not + vfs_current_is_local(). + * editlock.c (edit_lock_file): Disable locking on VFS. + 2003-04-01 Adam Byrtek * editlock.c, editlock.h: New files. Implement file locking in diff --git a/edit/edit.c b/edit/edit.c index bfdb517dc..62a59c786 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -409,9 +409,8 @@ edit_load_file (WEdit *edit) * VFS may report file size incorrectly, and slow load is not a big * deal considering overhead in VFS. */ - if (!vfs_current_is_local ()) { + if (!vfs_file_is_local (edit->filename)) fast_load = 0; - } /* * FIXME: line end translation should disable fast loading as well diff --git a/edit/editlock.c b/edit/editlock.c index 004b187a4..0ccdba93c 100644 --- a/edit/editlock.c +++ b/edit/editlock.c @@ -109,6 +109,10 @@ edit_lock_file (char *fname) if (!fname || !*fname) return 0; + /* Locking on VFS is not supported */ + if (!vfs_file_is_local (fname)) + return 0; + /* Check if already locked */ lockfname = g_strconcat (".#", fname, NULL); if (lstat (lockfname, &statbuf) == 0) {