File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -656,6 +656,9 @@ _checkToken: false
656656# Skip parsing the issue/merge_request description for time records
657657_skipDescriptionParsing : false
658658
659+ # directory for the track record files. defaults to ~/.local/share/.gtt/frames/, %LOCALAPPDATA%\.gtt\Data\frames or equivalent
660+ # frameDir: /some/absolute/directory/
661+
659662# settings for invoice output
660663invoiceSettings :
661664 from :
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ const defaults = {
4646 _skipDescriptionParsing : false ,
4747 throttleMaxRequestsPerInterval : 10 ,
4848 throttleInterval : 1000 ,
49+ frameDir : undefined ,
4950} ;
5051
5152/**
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class fileConfig extends config {
2222 this . assertGlobalConfig ( ) ;
2323 this . workDir = workDir ;
2424 this . data = Object . assign ( this . data , this . localExists ( ) ? this . parseLocal ( ) : this . parseGlobal ( ) ) ;
25+ if ( ! fs . existsSync ( this . frameDir ) ) shell . mkdir ( '-p' , this . frameDir ) ;
2526 this . _dump = { } ;
2627 this . cache = {
2728 delete : this . _cacheDelete ,
@@ -94,7 +95,6 @@ class fileConfig extends config {
9495
9596
9697 if ( ! fs . existsSync ( this . globalDir ) ) shell . mkdir ( '-p' , this . globalDir ) ;
97- if ( ! fs . existsSync ( this . frameDir ) ) shell . mkdir ( '-p' , this . frameDir ) ;
9898 if ( ! fs . existsSync ( this . cacheDir ) ) shell . mkdir ( '-p' , this . cacheDir ) ;
9999 if ( ! fs . existsSync ( this . global ) ) fs . appendFileSync ( this . global , '' ) ;
100100 }
@@ -139,7 +139,10 @@ class fileConfig extends config {
139139 }
140140
141141 get frameDir ( ) {
142- return Fs . join ( this . globalDir , 'frames/files' ) ;
142+ if ( this . data . frameDir ) {
143+ return this . data . frameDir ;
144+ }
145+ return Fs . join ( this . globalDir , 'frames' ) ;
143146 }
144147
145148 get cacheDir ( ) {
You can’t perform that action at this time.
0 commit comments