Anonymous | Login | 12-13-2019 05:31 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 | ||||
0006173 | [Squeak] Files | major | always | 02-19-07 22:39 | 11-18-08 20:25 | ||||
Reporter | black | View Status | public | ||||||
Assigned To | cdegroot | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.9 | ||||||
Summary | 0006173: Auto-detection of cr/lf is broken on MacOS X | ||||||||
Description |
Whenever an image is restarted, CrLfFileStream class >> startUp invokes CrLfFileStream class >> guessDefaultLineEndConvention to reset the class variable LineEndDefault to one of #cr, #lf or #crlf. This variable is used to determine the cr translation to be used. The same logic has been copied into MultiByteFileStream. The guessDefaultLineEndConvention uses the pathNameDelimiter of the deafult directory class to figure out which file system we are running on. This used to be correct, because Mac VMs ran on Mac file systems. But it is no longer correct: the right file directory on MacOSX is UnixFileDirectory, so this no longer suffices to distinguish Mac from ordinary Unix. |
||||||||
Additional Information |
I propose a fix in the attached changeset which makes the guessDefaultLineEndConvention look and see if the underlying platform is darwin (Mac OS's Unix), and if so choose #cr as the default line ending. The change is copied to both CrLfFileStream class >> guessDefaultLineEndConvention and MultiByteFileStream >> guessDefaultLineEndConvention. You might think that this code should go in a trait, so that it coulbe be sahred between the two classes. Or that MultiByteFileStream should subclass CrLfFileStream. But, in fact, CrLfFileStream is dead: its new method creates a MultiByteFileStream. So all of its methods except for CrLfFileStream new could be deleted. (Or, MultiByteFileStream could subclass CrLfFileStream, use basicNew, and all of its methods that replicate the superclass could be deleted.) Right now, however, I'm more concerned with getting the bug fixed than with getting the code cleaned up. |
||||||||
Attached Files |
![]() ![]() |
||||||||
|
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
48 total queries executed. 34 unique queries executed. |