Repository navigation
closes #14: added func returning init dir for empty records dir - #18
Merged
dominikbraun merged 2 commits intoMay 16, 2021
Merged
dominikbraun merged 2 commits into
dominikbraun merged 2 commits into
Conversation
added 2 commits
May 15, 2021 23:56
…eturns the init dir for t oday for the records dir (~/.timetrace/records/YYYY-MM-DD) and appended the slice in fs.EnsureDirectories accordingly.
ssuse of RecordDirFromDate causing creation of user home dir in records dir. removing filepath.Join and only returning fs.RecordDirFromDate(time.Now()) now correctly returns the init path for an empty record with a sub dir in the form of YYYY-MM-DD
Author
|
in the first PR is overlooked the fact that fs.RecordDirFromDate already creates a full path of |
dominikbraun
self-requested a review
May 16, 2021 06:25
dominikbraun
approved these changes
May 16, 2021
Owner
There was a problem hiding this comment.
Exactly, RecordDirFromDate returns the path for a record directory with the provided date. LGTM, thanks! 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As stated in the issue I added a func returning the init dir for the empty records directory and appended the slice in fs.EnsureDirectories accordingly. func recordsInitSubDir returns
~/.timetrace/records/YYYY-MM-DD. cmd timetrace status exists now with ErrTrackingNotStarted instead of with the err from ioutil.ReadDir.