Skip to content

Commit

Permalink
Apply formatting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Nov 29, 2023
1 parent 1f892b1 commit 55a6d4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Epub/Package.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ internal Package(ZipArchive zip, XDocument document, string baseDir = "OEBPS")
var ids = document.XPathSelectElements("opf:package/opf:metadata/dc:identifier", xmlns);
var pid = (uid == null ?
ids.FirstOrDefault() :
ids.FirstOrDefault(x => x.Attribute("id")?.Value == uid))
ids.FirstOrDefault(x => x.Attribute("id")?.Value == uid))
?? throw new InvalidArchiveException(ThisAssembly.Strings.MissingIdentifier);

var date = document.XPathSelectElement("opf:package/opf:metadata/opf:meta[@property='dcterms:modified']", xmlns)?.Value;
Expand Down
2 changes: 1 addition & 1 deletion src/Epub/Publication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Package ReadPackage()

using var reader = XmlReader.Create(entry.Open()).IgnoreNamespaces();
var doc = XDocument.Load(reader);
var root = doc.CssSelectElement("rootfile[full-path][media-type=application/oebps-package+xml]")
var root = doc.CssSelectElement("rootfile[full-path][media-type=application/oebps-package+xml]")
?? throw new InvalidArchiveException(ThisAssembly.Strings.MissingPackage);

var path = root.Attribute("full-path")?.Value;
Expand Down

0 comments on commit 55a6d4a

Please sign in to comment.