mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 06:43:51 +02:00
fix(linux): create the applications folder if doesn't exist (#1397)
This commit is contained in:
@@ -696,7 +696,13 @@ async function createDesktopFile() {
|
|||||||
.map(([key, value]) => `${key}=${value}`)
|
.map(([key, value]) => `${key}=${value}`)
|
||||||
.join('\n');
|
.join('\n');
|
||||||
try {
|
try {
|
||||||
// create/update the desktop file when needed
|
// Create the applications directory if it doesn't exist
|
||||||
|
const desktopDir = path.dirname(desktopFilePath);
|
||||||
|
if (!fs.existsSync(desktopDir)) {
|
||||||
|
fs.mkdirSync(desktopDir, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create/update the desktop file when needed
|
||||||
let existingDesktopFile = '';
|
let existingDesktopFile = '';
|
||||||
if (fs.existsSync(desktopFilePath)) {
|
if (fs.existsSync(desktopFilePath)) {
|
||||||
existingDesktopFile = fs.readFileSync(desktopFilePath, 'utf8');
|
existingDesktopFile = fs.readFileSync(desktopFilePath, 'utf8');
|
||||||
|
|||||||
Reference in New Issue
Block a user