Compare commits

..

No commits in common. "4f4b0cb3a80963aa3fd6f68938526df8447194a7" and "1fe4b75ac7b9eb97034e8bc1e7bdcc9dfed1d64d" have entirely different histories.

2 changed files with 2 additions and 6 deletions

View File

@ -1,6 +1,5 @@
using System.Net;
using System.Net.Http.Headers;
using System.Text.RegularExpressions;
using Logging;
namespace Tranga.LibraryConnectors;
@ -21,10 +20,7 @@ public abstract class LibraryConnector : GlobalBase
protected LibraryConnector(GlobalBase clone, string baseUrl, string auth, LibraryType libraryType) : base(clone)
{
Regex urlRex = new(@"https?:\/\/[0-9A-z\.]*");
if (!urlRex.IsMatch(baseUrl))
throw new ArgumentException("Base url does not match pattern");
this.baseUrl = urlRex.Match(baseUrl).Value;
this.baseUrl = baseUrl;
this.auth = auth;
this.libraryType = libraryType;
}

View File

@ -162,7 +162,7 @@ public abstract class MangaConnector : GlobalBase
Log($"Cloning cover {fileInCache} -> {newFilePath}");
File.Copy(fileInCache, newFilePath, true);
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
File.SetUnixFileMode(newFilePath, GroupRead | GroupWrite | UserRead | UserWrite);
File.SetUnixFileMode(newFilePath, GroupRead | GroupWrite | OtherRead | OtherWrite | UserRead | UserWrite);
}
/// <summary>