Skip to content

Commit

Permalink
close temporary file after creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Mar 17, 2024
1 parent 5ae17c5 commit 42f3e7d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ newTemporaryFileNamed: aName
| fileName |
fileName := GRPlatform current pathSeparator,'tmp', GRPlatform current pathSeparator, aName.
(self fileExists: fileName) ifTrue: [ GRError new signal: 'A (temporary) file with name ', aName, ' already exists.' ].
^ (GsFile open: fileName mode: 'ab' onClient: false) pathName
^ (GsFile open: fileName mode: 'ab' onClient: false) close pathName

0 comments on commit 42f3e7d

Please sign in to comment.