VirtualBox

Changeset 24293 in vbox for trunk/src


Ignore:
Timestamp:
Nov 3, 2009 3:23:08 PM (15 years ago)
Author:
vboxsync
Message:

Linux shared folders: fix O_APPEND logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r21511 r24293  
    190190        pos = *off;
    191191        if (file->f_flags & O_APPEND)
    192                 pos += inode->i_size;
     192        {
     193                pos = inode->i_size;
     194                *off = pos;
     195        }
    193196
    194197        /** XXX Check write permission accoring to inode->i_mode! */
     
    234237        }
    235238
    236 #if 1                           /* XXX: which way is correct? */
    237239        *off += total_bytes_written;
    238 #else
    239         file->f_pos += total_bytes_written;
    240 #endif
     240        if (*off > inode->i_size)
     241                inode->i_size = *off;
     242
    241243        sf_i->force_restat = 1;
    242244        free_bounch_buffer (tmp);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette