Anonymous | Login | 12-08-2019 06:11 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 | ||||
0001049 | [Squeak] Files | major | always | 04-07-05 05:24 | 01-21-06 09:14 | ||||
Reporter | johnmci | View Status | public | ||||||
Assigned To | cdegroot | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.8 | ||||||
Summary | 0001049: oldFileOrNoneNamed: does not work with partial file names and non-default file directory | ||||||||
Description |
If you have a FileDirectory instance which is valid and attempt to open an existing file not in the default file directory, it fails however if you use readOnlyFileNamed: that works. fileDirectoryFoobar oldFileOrNoneNamed: 'text.txt' "fails" fileDirectoryFoobar readOnlyFileNamed: 'text.txt' "works" why: oldFileOrNoneNamed uses FileStream fullName: fileName which resolves to FileDirectory default fullNameFor: fileName which gives us the path to the default directory that is work, but if you attempt to test with files in the default directory it works but readOnlyFileNamed says self fullNameFor: localFileName which then considers the instances of fileDirectory you are using and builds the correct name. |
||||||||
Additional Information |
FileDirectory>>oldFileOrNoneNamed: fileName "If the file exists, answer a read-only FileStream on it. If it doesn't, answer nil." | fullName | fullName _ self fullNameFor: fileName. (FileStream concreteStream isAFileNamed: fullName) ifTrue: [^ FileStream concreteStream readOnlyFileNamed: fullName] ifFalse: [^ nil]. |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
44 total queries executed. 35 unique queries executed. |