Skip to content

Commit

Permalink
Explicitly set File/Directory permissions for jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
C9Glax committed Oct 30, 2024
1 parent 067497d commit 02cf857
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Tranga/Jobs/JobBoss.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System.Text.RegularExpressions;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Tranga.MangaConnectors;
using static System.IO.UnixFileMode;

namespace Tranga.Jobs;

Expand Down Expand Up @@ -146,6 +148,8 @@ private void LoadJobsList(HashSet<MangaConnector> connectors)
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");
Expand Down

0 comments on commit 02cf857

Please sign in to comment.