This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
ncsa-mosaic/libutils/isFlatpak.c
Fries 672bbee31d Detects if Mosaic is in a Flatpak or not
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
2022-04-21 22:04:27 -07:00

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;
}
}