Skip to content

Commit 7e0b87f

Browse files
committed
Exclude generated files when copying to Draft
1 parent c4f8cf2 commit 7e0b87f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Planet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Planet/Entities/DraftModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class DraftModel: Identifiable, Equatable, Hashable, Codable, ObservableObject {
150150
)
151151
draft.attachments = try publicArticleFiles
152152
// exclude index.html, article.json
153-
.filter { !["index.html", "article.json"].contains($0.lastPathComponent) }
153+
.filter { !["index.html", "article.json", "_videoThumbnail.png", "_grid.jpg", "_grid.png"].contains($0.lastPathComponent) }
154154
.map { filePath in
155155
let attachment = Attachment(name: filePath.lastPathComponent, type: AttachmentType.from(filePath))
156156
attachment.draft = draft

0 commit comments

Comments
 (0)