* extfs.c (extfs_open): Don't run "copyout" if the file just has

been created or O_TRUNC is given in the flags.
Reported by Adam Byrtek 'alpha' <alpha@irc.pl>
This commit is contained in:
Pavel Roskin 2002-12-07 02:37:58 +00:00
parent fd44d72c55
commit 7a16741def
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2002-12-06 Pavel Roskin <proski@gnu.org> 2002-12-06 Pavel Roskin <proski@gnu.org>
* extfs.c (extfs_open): Don't run "copyout" if the file just has
been created or O_TRUNC is given in the flags.
Reported by Adam Byrtek 'alpha' <alpha@irc.pl>
* extfs/uar.in: Implement "copyin" and "rm" commands. * extfs/uar.in: Implement "copyin" and "rm" commands.
2002-12-06 Andrew V. Samoilov <sav@bcs.zp.ua> 2002-12-06 Andrew V. Samoilov <sav@bcs.zp.ua>

View File

@ -658,8 +658,8 @@ extfs_open (vfs * me, char *file, int flags, int mode)
return NULL; return NULL;
close (local_handle); close (local_handle);
if (extfs_cmd (" copyout ", archive, entry, local_filename) if (!created && !(flags & O_TRUNC)
&& !created) { && extfs_cmd (" copyout ", archive, entry, local_filename)) {
unlink (local_filename); unlink (local_filename);
free (local_filename); free (local_filename);
my_errno = EIO; my_errno = EIO;