From bd8cb86c529afbe16ceeb29330a1d0d677b7dec0 Mon Sep 17 00:00:00 2001 From: Glax Date: Wed, 30 Oct 2024 22:29:16 +0100 Subject: [PATCH] Always set directory-permissions --- Tranga/Jobs/JobBoss.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index c00458b..e3b8b9c 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -145,13 +145,11 @@ public class JobBoss : GlobalBase private void LoadJobsList(HashSet connectors) { + Directory.CreateDirectory(TrangaSettings.jobsFolderPath); + if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + File.SetUnixFileMode(TrangaSettings.jobsFolderPath, UserRead | UserWrite | UserExecute | GroupRead | OtherRead); if (!Directory.Exists(TrangaSettings.jobsFolderPath)) //No jobs to load - { - Directory.CreateDirectory(TrangaSettings.jobsFolderPath); - if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - File.SetUnixFileMode(TrangaSettings.jobsFolderPath, UserRead | UserWrite | UserExecute | GroupRead | OtherRead); return; - } Regex idRex = new (@"(.*)\.json"); //Load json-job-files