Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
C# annotationscbzcomicinfocomicscomics-readercross-platformcsharpepubepub-readerfreelinuxmangamedia-servermetadataopdsopds-feedpdfself-hostedubooquitywindows
Feature/docker parity (#714)
Joseph Milazzo7bfd2c432df5
diff --git a/API/Services/DirectoryService.cs b/API/Services/DirectoryService.csindex a606b774c..1148c60bb 100644--- a/API/Services/DirectoryService.cs+++ b/API/Services/DirectoryService.cs@@ -48,6 +48,7 @@ namespace API.ServicesreSearchPattern.IsMatch(Path.GetExtension(file)) && !Path.GetFileName(file).StartsWith(Parser.Parser.MacOsMetadataFileStartsWith));}+/// <summary>/// Returns a list of folders from end of fullPath to rootPath. If a file is passed at the end of the fullPath, it will be ignored.///@@ -96,7 +97,7 @@ namespace API.Servicesreturn di.Exists;}- public static IEnumerable<string> GetFiles(string path, string searchPatternExpression = "",+ public IEnumerable<string> GetFiles(string path, string searchPatternExpression = "",SearchOption searchOption = SearchOption.TopDirectoryOnly){if (searchPatternExpression != string.Empty)@@ -132,10 +133,10 @@ namespace API.Services/// </summary>/// <param name="sourceDirName"></param>/// <param name="destDirName"></param>- /// <param name="searchPattern">Defaults to empty string, meaning all files</param>+ /// <param name="searchPattern">Defaults to *, meaning all files</param>/// <returns></returns>/// <exception cref="DirectoryNotFoundException"></exception>- public static bool CopyDirectoryToDirectory(string sourceDirName, string destDirName, string searchPattern = "")+ public bool CopyDirectoryToDirectory(string sourceDirName, string destDirName, string searchPattern = "*"){if (string.IsNullOrEmpty(sourceDirName)) return false;@@ -177,13 +178,7 @@ namespace API.Services- /// <summary>- /// Get files with a file extension- /// </summary>- /// <param name="path"></param>- /// <param name="searchPatternExpression">Regex to use for searching on regex. Defaults to empty string for all files</param>- /// <returns></returns>- public static string[] GetFilesWithExtension(string path, string searchPatternExpression = "")+ public string[] GetFilesWithExtension(string path, string searchPatternExpression = ""){if (searchPatternExpression != string.Empty){@@ -381,11 +376,8 @@ namespace API.ServicesIEnumerable<string> subDirs;string[] files;- try- {- // Default EnumerationOptions will ignore system and hidden folders- subDirs = Directory.GetDirectories(currentDir, "*", new EnumerationOptions())- .Where(path => ExcludeDirectories.Matches(path).Count == 0);+ try {+ subDirs = Directory.GetDirectories(currentDir).Where(path => ExcludeDirectories.Matches(path).Count == 0);}// Thrown if we do not have discovery permission on the directory.catch (UnauthorizedAccessException e) {diff --git a/monorepo-build.sh b/monorepo-build.shindex be452b235..6d3cf85d8 100755--- a/monorepo-build.sh+++ b/monorepo-build.sh@@ -50,22 +50,22 @@ Package()echo "Copying Install information"cp ../INSTALL.txt "$lOutputFolder"/README.txt-+echo "Copying LICENSE"cp ../LICENSE "$lOutputFolder"/LICENSE.txtecho "Show API structure"find-+echo "Copying appsettings.json"- cp appsettings.Development.json $lOutputFolder/appsettings.json+ cp appsettings.Development.json $lOutputFolder/config/appsettings.jsonecho "Creating tar"cd ../$outputFolder/"$runtime"/tar -czvf ../kavita-$runtime.tar.gz Kavita-- ProgressEnd "Creating $runtime Package for $framework"-++ ProgressEnd "Creating $runtime Package for $framework"+}dir=$PWD