1
1

Ticket #1395 (Copying to fish is broken)

No any files was copyed into fish.

Issue:
Files was try to create with O_EXCL flag. On fish it's fail
Now for fish flag O_EXCL will dropped.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
Slava Zanko 2009-07-09 15:42:10 +03:00
родитель f830dcc0a8
Коммит 9ee5f318ab
3 изменённых файлов: 17 добавлений и 1 удалений

Просмотреть файл

@ -727,7 +727,7 @@ vfs_s_readlink (struct vfs_class *me, const char *path, char *buf, size_t size)
return len;
}
static void *
void *
vfs_s_open (struct vfs_class *me, const char *file, int flags, int mode)
{
int was_changed = 0;

Просмотреть файл

@ -1135,6 +1135,18 @@ fish_fill_names (struct vfs_class *me, fill_names_f func)
}
}
static void *
fish_open (struct vfs_class *me, const char *file, int flags, int mode)
{
/*
sorry, i've places hack here
cause fish don't able to open files with O_EXCL flag
*/
flags &= ~O_EXCL;
return vfs_s_open (me, file, flags, mode);
}
void
init_fish (void)
{
@ -1157,6 +1169,7 @@ init_fish (void)
vfs_fish_ops.fill_names = fish_fill_names;
vfs_fish_ops.chmod = fish_chmod;
vfs_fish_ops.chown = fish_chown;
vfs_fish_ops.open = fish_open;
vfs_fish_ops.symlink = fish_symlink;
vfs_fish_ops.link = fish_link;
vfs_fish_ops.unlink = fish_unlink;

Просмотреть файл

@ -135,6 +135,9 @@ int vfs_file_class_flags (const char *filename);
void vfs_fill_names (fill_names_f);
char *vfs_translate_url (const char *);
/* vfs/direntry.c: */
void *vfs_s_open (struct vfs_class *, const char *, int, int);
#ifdef USE_NETCODE
extern int use_netrc;
#endif