Changeset 82837 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Jan 23, 2020 1:35:04 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/fileio-win.cpp
r82836 r82837 935 935 936 936 /* 937 * Change the EOF marker. We may have to 937 * Change the EOF marker. 938 * 939 * HACK ALERT! If the file was opened in RTFILE_O_APPEND mode, we will have 940 * to re-open it with FILE_WRITE_DATA access to get the job done. 941 * This how ftruncate on a unixy system would work but not how 942 * it is done on Windows where appending is a separate permission 943 * rather than just a write modifier, making this hack totally wrong. 944 */ 945 /** @todo The right way to fix this is either to add a RTFileSetSizeEx function 946 * for specifically requesting the unixy behaviour, or add an additional 947 * flag to RTFileOpen[Ex] to request the unixy append behaviour there. 948 * The latter would require saving the open flags in a instance data 949 * structure, which is a bit of a risky move, though something we should 950 * do in 6.2 (or later). 951 * 952 * Note! Because handle interitance, it is not realyan option to 953 * always use FILE_WRITE_DATA and implement the RTFILE_O_APPEND 954 * bits in RTFileWrite and friends. Besides, it's not like 955 * RTFILE_O_APPEND is so clearly defined anyway - see 956 * RTFileWriteAt. 938 957 */ 939 958 IO_STATUS_BLOCK Ios = RTNT_IO_STATUS_BLOCK_INITIALIZER;
Note:
See TracChangeset
for help on using the changeset viewer.