fix(linux): create the applications folder if doesn't exist (#1397)

This commit is contained in:
rs189
2025-10-01 06:28:01 +09:00
committed by GitHub
parent febeb84c25
commit eb17c32a3a

View File

@@ -696,7 +696,13 @@ async function createDesktopFile() {
.map(([key, value]) => `${key}=${value}`)
.join('\n');
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 = '';
if (fs.existsSync(desktopFilePath)) {
existingDesktopFile = fs.readFileSync(desktopFilePath, 'utf8');