VirtualBox

Changeset 24338 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 4, 2009 3:05:17 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: fileio-win: Set GENERIC_WRITE DesiredAccess flag when truncating an existing file in RTFileOpen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/fileio-win.cpp

    r24031 r24338  
    219219            return VERR_INVALID_PARAMETER;
    220220    }
     221    if (dwCreationDisposition == TRUNCATE_EXISTING)
     222        /* The calling process must open the file with the GENERIC_WRITE bit set as part of the dwDesiredAccess parameter. */
     223        dwDesiredAccess |= GENERIC_WRITE;
    221224
    222225    /* RTFileSetMode needs following rights as well. */
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