diff --git a/API/Services/DirectoryService.cs b/API/Services/DirectoryService.cs
index a606b774c..1148c60bb 100644
--- a/API/Services/DirectoryService.cs
+++ b/API/Services/DirectoryService.cs
@@ -48,6 +48,7 @@ namespace API.Services
reSearchPattern.IsMatch(Path.GetExtension(file)) && !Path.GetFileName(file).StartsWith(Parser.Parser.MacOsMetadataFileStartsWith));
}
+
///
/// 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.Services
return di.Exists;
}
- public static IEnumerable GetFiles(string path, string searchPatternExpression = "",
+ public IEnumerable GetFiles(string path, string searchPatternExpression = "",
SearchOption searchOption = SearchOption.TopDirectoryOnly)
{
if (searchPatternExpression != string.Empty)
@@ -132,10 +133,10 @@ namespace API.Services
///
///
///
- /// Defaults to empty string, meaning all files
+ /// Defaults to *, meaning all files
///
///
- 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
- ///
- /// Get files with a file extension
- ///
- ///
- /// Regex to use for searching on regex. Defaults to empty string for all files
- ///
- 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.Services
IEnumerable 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.sh
index 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.txt
echo "Show API structure"
find
-
+
echo "Copying appsettings.json"
- cp appsettings.Development.json $lOutputFolder/appsettings.json
+ cp appsettings.Development.json $lOutputFolder/config/appsettings.json
echo "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