File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -236,16 +236,21 @@ procedure TFormTrackerModify.FormCreate(Sender: TObject);
236
236
end ;
237
237
238
238
{ $IFDEF LINUX}
239
- // if a ubuntu snap program then save it to other place
239
+ // If it is a Ubuntu snap program, save it a special folder
240
240
FFolderForTrackerListLoadAndSave := GetEnvironmentVariable(' SNAP_USER_COMMON' );
241
+ // If it is a flatpak program, save it in a special folder
242
+ if GetEnvironmentVariable(' container' ) = ' flatpak' then
243
+ begin
244
+ FFolderForTrackerListLoadAndSave := GetEnvironmentVariable(' XDG_DATA_HOME' );
245
+ end ;
241
246
if FFolderForTrackerListLoadAndSave = ' ' then
242
247
begin
243
- // NOT a snap program
248
+ // No container detected. Save in the same place as the application file
244
249
FFolderForTrackerListLoadAndSave := ExtractFilePath(Application.ExeName);
245
250
end
246
251
else
247
252
begin
248
- // A snap program
253
+ // Program run in a container. Must load file from a dedicated folder.
249
254
FFolderForTrackerListLoadAndSave := AppendPathDelim(FFolderForTrackerListLoadAndSave);
250
255
end ;
251
256
{ $ELSE}
You can’t perform that action at this time.
0 commit comments