Manuscript (Case [Issue]22458) _Inbox - lastFileFor: baseFileName extension: extension randomly sorts files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Manuscript (Case [Issue]22458) _Inbox - lastFileFor: baseFileName extension: extension randomly sorts files

Pharo Issue Tracker
Manuscript Notification
avatar
Stephane Ducasse opened Case 22458: lastFileFor: baseFileName extension: extension randomly sorts files and assigned it to Everyone:
Bug in Project:  _Inbox: Not Spam  •  You are subscribed to this case
lastFileFor: baseFileName extension: extension
"Assumes a file is named using a version number encoded as '.' followed by digits
preceding the file extension, e.g., games.22.ston
Answer the file name with the largest number.
If a version number is not found, raises an error"

"FileSystem workingDirectory lastFileFor: 'games' extension: 'ston'"

| files |
files := self childrenMatching: baseFileName , '.*.' , extension.
files ifEmpty: [ ^ self error: 'No file with number pattern' ].
^ (files asSortedCollection: [ :a :b | a basename < b basename ]) last
Priority Priority: 5 – Fix If Time Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Pharo7.0

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want Manuscript notifications anymore? Update your preferences.

Manuscript

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker