mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* 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.
This commit is contained in:
parent
12ba0fc8a4
commit
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>
|
||||
|
||||
* 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 */
|
||||
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;
|
||||
}
|
||||
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
|
||||
* 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;
|
||||
}
|
||||
name = vfs_s_fullpath (me, fh->ino);
|
||||
if (!name)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user