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);
236236 end ;
237237
238238 { $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
240240 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 ;
241246 if FFolderForTrackerListLoadAndSave = ' ' then
242247 begin
243- // NOT a snap program
248+ // No container detected. Save in the same place as the application file
244249 FFolderForTrackerListLoadAndSave := ExtractFilePath(Application.ExeName);
245250 end
246251 else
247252 begin
248- // A snap program
253+ // Program run in a container. Must load file from a dedicated folder.
249254 FFolderForTrackerListLoadAndSave := AppendPathDelim(FFolderForTrackerListLoadAndSave);
250255 end ;
251256 { $ELSE}
You can’t perform that action at this time.
0 commit comments