From 8535c2a948ef2b0797bdfd66bee4752a6a4ae0c2 Mon Sep 17 00:00:00 2001 From: rachfop Date: Thu, 2 May 2024 08:21:04 -0700 Subject: [PATCH] 2 --- src/Sync.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Sync.js b/src/Sync.js index 94f6e62..ee87abd 100644 --- a/src/Sync.js +++ b/src/Sync.js @@ -288,9 +288,7 @@ class Sync { this.progress.updateTotal(filePaths.length); const extractRootPath = join(rootDir, extractionDir); for (const item of filePaths) { - if (fileSnips.length > 0) { - this.usedRepos.add(`${owner}/${repo}`); - } + const ext = determineExtension(item.name); let itemPath = join(item.directory, item.name); if (rtype == "remote") { @@ -313,6 +311,9 @@ class Sync { const snip = new Snippet(id, ext, owner, repo, ref, item); fileSnips.push(snip); } + if (fileSnips.length > 0) { + this.usedRepos.add(`${owner}/${repo}`); + } }); snippets.push(...fileSnips); this.progress.increment();