Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
configurable framedir to keep compatibility with 1.7
  • Loading branch information
ndu2 committed May 25, 2025
commit 2bc939c4cd39fd1c4ce7c0fd4c3bc20f675d3c42
3 changes: 3 additions & 0 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@ _checkToken: false
# Skip parsing the issue/merge_request description for time records
_skipDescriptionParsing: false

# directory for the track record files. defaults to ~/.local/share/.gtt/frames/, %LOCALAPPDATA%\.gtt\Data\frames or equivalent
#frameDir: /some/absolute/directory/

# settings for invoice output
invoiceSettings:
from:
Expand Down
1 change: 1 addition & 0 deletions src/include/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const defaults = {
_skipDescriptionParsing: false,
throttleMaxRequestsPerInterval: 10,
throttleInterval: 1000,
frameDir: undefined,
};

/**
Expand Down
7 changes: 5 additions & 2 deletions src/include/file-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class fileConfig extends config {
this.assertGlobalConfig();
this.workDir = workDir;
this.data = Object.assign(this.data, this.localExists() ? this.parseLocal() : this.parseGlobal());
if (!fs.existsSync(this.frameDir)) shell.mkdir('-p', this.frameDir);
this._dump = {};
this.cache = {
delete: this._cacheDelete,
Expand Down Expand Up @@ -94,7 +95,6 @@ class fileConfig extends config {


if (!fs.existsSync(this.globalDir)) shell.mkdir('-p', this.globalDir);
if (!fs.existsSync(this.frameDir)) shell.mkdir('-p', this.frameDir);
if (!fs.existsSync(this.cacheDir)) shell.mkdir('-p', this.cacheDir);
if (!fs.existsSync(this.global)) fs.appendFileSync(this.global, '');
}
Expand Down Expand Up @@ -139,7 +139,10 @@ class fileConfig extends config {
}

get frameDir() {
return Fs.join(this.globalDir, 'frames/files');
if(this.data.frameDir) {
return this.data.frameDir;
}
return Fs.join(this.globalDir, 'frames');
}

get cacheDir() {
Expand Down