Don't copy over Thumbs.db!
This commit is contained in:
parent
c82c5e31a3
commit
7e3dee3ed0
1 changed files with 6 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ const COVER_MIMETYPE = "image/png";
|
|||
|
||||
module.exports = function (scaffoldingPath, bookPath, contentPath, chaptersPath, manifestPath) {
|
||||
return Promise.all([
|
||||
cpr(scaffoldingPath, bookPath),
|
||||
cpr(scaffoldingPath, bookPath, { filter: noThumbs }),
|
||||
getChapters(contentPath, chaptersPath, manifestPath).then(function (chapters) {
|
||||
return Promise.all([
|
||||
writeOpf(chapters, contentPath),
|
||||
|
|
@ -34,6 +34,11 @@ module.exports = function (scaffoldingPath, bookPath, contentPath, chaptersPath,
|
|||
.then(function () { });
|
||||
};
|
||||
|
||||
function noThumbs(filePath) {
|
||||
// Thumbs.db causes the strangest errors as Windows has it locked a lot of the time.
|
||||
return path.basename(filePath) !== "Thumbs.db";
|
||||
}
|
||||
|
||||
function writeOpf(chapters, contentPath) {
|
||||
const manifestChapters = chapters.map(function (c) {
|
||||
return `<item id="${c.id}" href="${c.href}" media-type="application/xhtml+xml"/>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue