Commit graph

15 commits

Author SHA1 Message Date
JetSetIlly
ab05b31960 archivefs: set complete flag in all instances
if the name of the directory to be read hadn't changed then the result
was returned immediately but with the complete flag being set

this caused the ROM select window to forever centre on the currently
selected file. the bug was not noticeable unless the select window was
used for a second time in a session

the archivefs set channel now expects an instance of an Options type.
added a force option to instruct archivefs to always re-read directory
2024-12-22 11:53:47 +00:00
JetSetIlly
33a446d412 improved process for centering on ROM in ROM select window
added Complete field to AsyncResults in archivefs package. set to true
once all entries have been read into the Entries list

previously it was possible for the centreOnFile flag to be set to
false prematurely, leaving the select window incorrectly centered on th
most recent file
2024-12-20 14:05:32 +00:00
JetSetIlly
f66d020907 added lint target to Makefile
checks that linters exist before proceeding. project URL for each linter
in the Makefile comments

only go-errorlint and unconvert used at the moment

fixed all lint errors for the added linters
2024-11-23 14:56:36 +00:00
JetSetIlly
f28a0736f4 fixed call to filepath.Clean() in archives.Set()
this fixes an issue on Windows where ROM selector could
not navigate backwards out of the installation folder.
Issue #30
2024-06-21 21:00:02 +01:00
JetSetIlly
a75909c5ab async archivefs could include incorrect entries
this could happen when changing directories when a previous list was
ongoing. this was supposed to have been fixed in fcb8439 and 02bb6a33
but both were incorrect in some sitations

the new solution correctly waits for a cancel to complete using a mutex
2024-05-30 23:12:50 +01:00
JetSetIlly
fcb8439531 archivefs fix committed in 02bb6a33 was incorrect/incomplete 2024-05-29 10:23:45 +01:00
JetSetIlly
02bb6a3355 solved deadlock in asynchronous use of archivefs
setting a new path could deadlock if a previous set was still being processed
2024-05-28 16:43:23 +01:00
JetSetIlly
f9cdb366dd improved reliabilty of archivefs.List()
there was a very small % chance that the List() would end before all
entries had been received

'go test -shuffle on -count 100000 ./archivefs' reports no failures
2024-05-18 15:46:06 +01:00
JetSetIlly
dd06910403 archivefs optionally sets a 'fallback' path
if the requested path to Set() does not exist, the function will
fallback to largest sub-path that does exist
2024-05-17 20:35:36 +01:00
JetSetIlly
30f9326a82 better asynchronous listing of directory with archivefs 2024-05-17 11:20:22 +01:00
JetSetIlly
7be60c0c2a corrected archivefs Set() function so that it works in Windows
Windows volume names confused the Set() function

archivefs.Async no longer exits async goroutine on errors from Path
functions. exiting meant that the channels were no longer being
serviced, causing GUI deadlocks
2024-05-05 17:00:38 +01:00
JetSetIlly
2d974cc9c1 AsyncPath improvments
fixed occasional data race in Close() function. added Destroy()
interface to window manager
2024-04-29 17:37:52 +01:00
JetSetIlly
3a5f7c79da added AsyncPath to archivefs. allows asynchronous use of archivefs
ROM select could noticeable stall the GUI if there were many files in a
directory
2024-04-28 21:26:29 +01:00
JetSetIlly
b011090937 corrected archivefs docs 2024-04-17 15:59:17 +01:00
JetSetIlly
e3f4a743b6 added archivefs package and support in cartridgeloader and ROM select window
archivefs allows opening of files inside a zip archive. support for
other archive file type will be added in the future when possible
2024-04-16 19:22:38 +01:00