mirror of
https://github.com/C9Glax/tranga.git
synced 2025-01-12 03:17:33 +01:00
Explicitly set File/Directory permissions for jobs
This commit is contained in:
parent
067497ddd0
commit
02cf8578c9
@ -1,6 +1,8 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Tranga.MangaConnectors;
|
using Tranga.MangaConnectors;
|
||||||
|
using static System.IO.UnixFileMode;
|
||||||
|
|
||||||
namespace Tranga.Jobs;
|
namespace Tranga.Jobs;
|
||||||
|
|
||||||
@ -146,6 +148,8 @@ public class JobBoss : GlobalBase
|
|||||||
if (!Directory.Exists(TrangaSettings.jobsFolderPath)) //No jobs to load
|
if (!Directory.Exists(TrangaSettings.jobsFolderPath)) //No jobs to load
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(TrangaSettings.jobsFolderPath);
|
Directory.CreateDirectory(TrangaSettings.jobsFolderPath);
|
||||||
|
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
|
File.SetUnixFileMode(TrangaSettings.jobsFolderPath, UserRead | UserWrite | UserExecute | GroupRead | OtherRead);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Regex idRex = new (@"(.*)\.json");
|
Regex idRex = new (@"(.*)\.json");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user