mirror of https://github.com/MidnightCommander/mc
* direntry.c (vfs_s_open): If the filesystem is read-only,
disable file creation.
This commit is contained in:
parent
423849f74d
commit
ddf2ad1612
|
@ -1,5 +1,8 @@
|
|||
2002-12-24 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* direntry.c (vfs_s_open): If the filesystem is read-only,
|
||||
disable file creation.
|
||||
|
||||
* vfs.c (mc_chdir): Don't change current directory until the
|
||||
low-level chdir succeeds.
|
||||
|
||||
|
|
|
@ -753,7 +753,9 @@ vfs_s_open (vfs *me, char *file, int flags, int mode)
|
|||
vfs_s_entry *ent;
|
||||
vfs_s_inode *dir;
|
||||
int tmp_handle;
|
||||
if (!(flags & O_CREAT))
|
||||
|
||||
/* If the filesystem is read-only, disable file creation */
|
||||
if (!(flags & O_CREAT) || !(me->write))
|
||||
return NULL;
|
||||
|
||||
split_dir_name (me, q, &dirname, &name, &save);
|
||||
|
|
Loading…
Reference in New Issue