Skip to content

Commit bf52026

Browse files
add: running inside appimage detection.
When running inside appimage, you need to know where to save the tracker list
1 parent 88fc022 commit bf52026

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/code/main.pas

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ procedure TFormTrackerModify.FormCreate(Sender: TObject);
243243
begin
244244
FFolderForTrackerListLoadAndSave := GetEnvironmentVariable('XDG_DATA_HOME');
245245
end;
246+
// If it is a appimage program, save it in a present folder.
247+
if GetEnvironmentVariable('APPIMAGE') <> '' then
248+
begin // OWD = Path to working directory at the time the AppImage is called
249+
FFolderForTrackerListLoadAndSave := GetEnvironmentVariable('OWD');
250+
end;
246251
if FFolderForTrackerListLoadAndSave = '' then
247252
begin
248253
// No container detected. Save in the same place as the application file

0 commit comments

Comments
 (0)