Fries
672bbee31d
If Mosaic is running in a Flatpak, it will use $XDG_DATA_HOME If Mosaic is running outside a Flatpak environment, it will use $HOME/.mosaic
12 lines
182 B
C
12 lines
182 B
C
#include <stdio.h>
|
|
|
|
int isFlatpak() {
|
|
FILE *file;
|
|
if ((file = fopen("/.flatpak-info", "r"))) {
|
|
fclose(file);
|
|
return 1;
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|