mirror of
https://github.com/AntonyCorbett/JWLMerge
synced 2026-01-17 00:06:57 -05:00
bump ver
This commit is contained in:
@@ -673,11 +673,8 @@ public sealed class BackupFileService : IBackupFileService
|
||||
{
|
||||
ProgressMessage($"Reading database {databaseName}");
|
||||
|
||||
var databaseEntry = archive.Entries.FirstOrDefault(x => x.Name.Equals(databaseName, StringComparison.OrdinalIgnoreCase));
|
||||
if (databaseEntry == null)
|
||||
{
|
||||
throw new BackupFileServicesException("Could not find database entry in jwlibrary file");
|
||||
}
|
||||
var databaseEntry = archive.Entries.FirstOrDefault(x => x.Name.Equals(databaseName, StringComparison.OrdinalIgnoreCase))
|
||||
?? throw new BackupFileServicesException("Could not find database entry in jwlibrary file");
|
||||
|
||||
Database result;
|
||||
var tmpFile = Path.GetTempFileName();
|
||||
@@ -706,11 +703,8 @@ public sealed class BackupFileService : IBackupFileService
|
||||
using var archive = new ZipArchive(File.OpenRead(jwlibraryFile), ZipArchiveMode.Read);
|
||||
var manifest = ReadManifest(Path.GetFileName(jwlibraryFile), archive);
|
||||
|
||||
var databaseEntry = archive.Entries.FirstOrDefault(x => x.Name.Equals(manifest.UserDataBackup.DatabaseName, StringComparison.OrdinalIgnoreCase));
|
||||
if (databaseEntry == null)
|
||||
{
|
||||
throw new BackupFileServicesException($"Could not find database entry in ZipArchive: {jwlibraryFile}");
|
||||
}
|
||||
var databaseEntry = archive.Entries.FirstOrDefault(x => x.Name.Equals(manifest.UserDataBackup.DatabaseName, StringComparison.OrdinalIgnoreCase))
|
||||
?? throw new BackupFileServicesException($"Could not find database entry in ZipArchive: {jwlibraryFile}");
|
||||
|
||||
var tmpFile = Path.GetTempFileName();
|
||||
|
||||
@@ -724,12 +718,9 @@ public sealed class BackupFileService : IBackupFileService
|
||||
{
|
||||
ProgressMessage("Reading manifest");
|
||||
|
||||
var manifestEntry = archive.Entries.FirstOrDefault(x => x.Name.Equals(ManifestEntryName, StringComparison.OrdinalIgnoreCase));
|
||||
if (manifestEntry == null)
|
||||
{
|
||||
throw new BackupFileServicesException($"Could not find manifest entry in jwlibrary file: {filename}");
|
||||
}
|
||||
|
||||
var manifestEntry = archive.Entries.FirstOrDefault(x => x.Name.Equals(ManifestEntryName, StringComparison.OrdinalIgnoreCase))
|
||||
?? throw new BackupFileServicesException($"Could not find manifest entry in jwlibrary file: {filename}");
|
||||
|
||||
using var stream = new StreamReader(manifestEntry.Open());
|
||||
|
||||
var fileContents = stream.ReadToEnd();
|
||||
|
||||
@@ -104,8 +104,10 @@ public class BibleNotesFile
|
||||
|
||||
++n;
|
||||
|
||||
currentSection = new PubNotesFileSection(new PubSymbolAndLanguage(pubSymbol, languageId));
|
||||
currentSection.ContentStartLine = n + 1;
|
||||
currentSection = new PubNotesFileSection(new PubSymbolAndLanguage(pubSymbol, languageId))
|
||||
{
|
||||
ContentStartLine = n + 1
|
||||
};
|
||||
}
|
||||
|
||||
if (currentSection != null)
|
||||
@@ -116,7 +118,7 @@ public class BibleNotesFile
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
private string[] FileContentsFactory(string filePath)
|
||||
private static string[] FileContentsFactory(string filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
@@ -131,7 +133,7 @@ public class BibleNotesFile
|
||||
return File.ReadAllLines(filePath);
|
||||
}
|
||||
|
||||
private string[] FileContentsFactory(string[] fileContents)
|
||||
private static string[] FileContentsFactory(string[] fileContents)
|
||||
{
|
||||
return fileContents;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ExcelService : IExportToFileService
|
||||
}
|
||||
|
||||
var noteContent = noteTooLarge
|
||||
? note.NoteContent!.Substring(0, Int16.MaxValue)
|
||||
? note.NoteContent![..short.MaxValue]
|
||||
: note.NoteContent;
|
||||
|
||||
SetCellStringValue(worksheet, row, 1, note.PubSymbol);
|
||||
|
||||
@@ -27,7 +27,7 @@ internal static class VersionDetection
|
||||
var segments = latestVersionUri.Segments;
|
||||
if (segments.Any())
|
||||
{
|
||||
version = segments[segments.Length - 1];
|
||||
version = segments[^1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: AssemblyVersion("2.1.0.1")]
|
||||
[assembly: AssemblyVersion("2.1.0.2")]
|
||||
Reference in New Issue
Block a user