dominikbraun / timetrace

A simple CLI for tracking your working time.
Apache License 2.0
685 stars 76 forks source link

fixed issue with attempting to load data from an empty directory #96

Closed joshuaherrera closed 3 years ago

joshuaherrera commented 3 years ago

Resolves issue #95 by checking that the latest directory contains at least 1 file.

joshuaherrera commented 3 years ago

That change looks good, I just committed your suggestion.

Maybe we'll extend the Filesystem interface later and add a function like LatestRecordDirPath so we can move this filesystem-related logic into the fs package.

Yes, I wasn't sure where the best place to put these helper functions would be, so I put them in the timetrace.go file. I like this idea better though.

dominikbraun commented 3 years ago

This fix is contained in release 0.7.1.