* fish.c (fish_fh_open): Generate fh->ino->localname
if this one is NULL and file is opened for writting only. * ftpfs.c (ftpfs_fh_open): Likewise if control_connection_buzy is true.
Этот коммит содержится в:
родитель
12ba0fc8a4
Коммит
b314cad164
@ -1,3 +1,10 @@
|
|||||||
|
2002-05-22 Andrew V. Samoilov <kai@cmail.ru>
|
||||||
|
|
||||||
|
* fish.c (fish_fh_open): Generate fh->ino->localname
|
||||||
|
if this one is NULL and file is opened for writting only.
|
||||||
|
* ftpfs.c (ftpfs_fh_open): Likewise if control_connection_buzy
|
||||||
|
is true.
|
||||||
|
|
||||||
2002-05-21 Andrew V. Samoilov <kai@cmail.ru>
|
2002-05-21 Andrew V. Samoilov <kai@cmail.ru>
|
||||||
|
|
||||||
* direntry.c (vfs_s_retrieve_file): Please, care about
|
* direntry.c (vfs_s_retrieve_file): Please, care about
|
||||||
|
@ -778,6 +778,12 @@ static int fish_fh_open (vfs *me, vfs_s_fh *fh, int flags, int mode)
|
|||||||
{
|
{
|
||||||
/* File will be written only, so no need to retrieve it */
|
/* File will be written only, so no need to retrieve it */
|
||||||
if (((flags & O_WRONLY) == O_WRONLY) && !(flags & (O_RDONLY|O_RDWR))){
|
if (((flags & O_WRONLY) == O_WRONLY) && !(flags & (O_RDONLY|O_RDWR))){
|
||||||
|
if (!fh->ino->localname){
|
||||||
|
int tmp_handle = mc_mkstemps (&fh->ino->localname, me->name, NULL);
|
||||||
|
if (tmp_handle == -1)
|
||||||
|
return -1;
|
||||||
|
close (tmp_handle);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!fh->ino->localname)
|
if (!fh->ino->localname)
|
||||||
|
@ -1701,8 +1701,15 @@ static int ftpfs_fh_open (vfs *me, vfs_s_fh *fh, int flags, int mode)
|
|||||||
* to local temporary file and stored to ftp server
|
* to local temporary file and stored to ftp server
|
||||||
* by vfs_s_close later
|
* by vfs_s_close later
|
||||||
*/
|
*/
|
||||||
if (FH_SUPER->u.ftp.control_connection_buzy)
|
if (FH_SUPER->u.ftp.control_connection_buzy){
|
||||||
|
if (!fh->ino->localname){
|
||||||
|
int handle = mc_mkstemps (&fh->ino->localname, me->name, NULL);
|
||||||
|
if (handle == -1)
|
||||||
|
return -1;
|
||||||
|
close (handle);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
name = vfs_s_fullpath (me, fh->ino);
|
name = vfs_s_fullpath (me, fh->ino);
|
||||||
if (!name)
|
if (!name)
|
||||||
return -1;
|
return -1;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user