Skip to content

Commit

Permalink
fix: only clean up managed files
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Dec 20, 2024
1 parent 6e7404d commit 1b59670
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function main() {
// remove posts that exist locally but not in Notion Database
const contentFiles = getAllContentFiles("content");
for (const file of contentFiles) {
if (!pages.includes(file.filename) && file) {
if (!pages.includes(file.filename) && file.managed) {
console.info(`[Info] Removing unsynced file ${file.filepath}`);
fs.removeSync(file.filepath);
}
Expand Down

0 comments on commit 1b59670

Please sign in to comment.