Anonymous | Login | 12-08-2019 00:47 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0001305 | [Squeak] Files | minor | always | 06-03-05 21:16 | 12-12-05 11:24 | |||||||
Reporter | chris | View Status | public | |||||||||
Assigned To | andreas | |||||||||||
Priority | normal | Resolution | open | |||||||||
Status | assigned | Product Version | 3.8 | |||||||||
Summary | 0001305: StandardFileStream>>truncate: bug | |||||||||||
Description |
After using myFileStream>>#truncate:, the #size of the file still reflects the old size until you #close and then #open the file. The size of the file should reflect what it was truncated to. |
|||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
![]() |
|
(0002912 - 434 - 948 - 948 - 1040 - 1040 - 1040) cdegroot 10-19-05 23:57 |
Reproducable on Win32. Seems to be in the primitives... testTruncate "Mantis 0001305" | stream | [(FileDirectory default forceNewFileNamed: 'filestream.tst') nextPutAll: '42'; close. stream := FileDirectory default oldFileNamed: 'filestream.tst'. [stream truncate. self assert: stream size = 0] ensure: [stream close] ] ensure: [FileDirectory default deleteFileNamed: 'filestream.tst' ifAbsent: nil] |
(0002913 - 167 - 173 - 173 - 173 - 173 - 173) cdegroot 10-20-05 00:10 |
On Win32, sqFileSize in the sqWin32FilePlugin.c returns f->fileSize instead of going to the OS. Which probably means that the truncate function should fix f->fileSize. |
(0003287 - 62 - 62 - 62 - 62 - 62 - 62) cdegroot 12-12-05 11:24 |
Andreas - could you check whether my analysis is correct here? |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
47 total queries executed. 35 unique queries executed. |