* editcmd.c (edit_save_file): Call mc_chown () and mc_chmod ()
before mc_open () to prevent hangs over ftpfs.
Этот коммит содержится в:
родитель
0b08e1b69f
Коммит
16b73c1f39
@ -1,5 +1,8 @@
|
||||
2002-05-13 Andrew V. Samoilov <kai@cmail.ru>
|
||||
|
||||
* editcmd.c (edit_save_file): Call mc_chown () and mc_chmod ()
|
||||
before mc_open () to prevent hangs over ftpfs.
|
||||
|
||||
* edit.h: Remove open, close, write, read and mkdir declaration.
|
||||
* edit.c: Use mc_open, mc_close, mc_write, mc_read, mc_rename,
|
||||
mc_chmod and mc_chown. Don't cast (char *) to (unsigned long)
|
||||
|
@ -222,13 +222,13 @@ int edit_save_file (WEdit * edit, const char *filename)
|
||||
} else
|
||||
savename = g_strdup (filename);
|
||||
|
||||
mc_chmod (savename, edit->stat1.st_mode);
|
||||
mc_chown (savename, edit->stat1.st_uid, edit->stat1.st_gid);
|
||||
|
||||
if ((fd = mc_open (savename, O_CREAT | O_WRONLY | O_TRUNC | MY_O_TEXT,
|
||||
edit->stat1.st_mode)) == -1)
|
||||
goto error_save;
|
||||
|
||||
mc_chmod (savename, edit->stat1.st_mode);
|
||||
mc_chown (savename, edit->stat1.st_uid, edit->stat1.st_gid);
|
||||
|
||||
/* pipe save */
|
||||
if ((p = (char *) edit_get_write_filter (savename, filename))) {
|
||||
FILE *file;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user