diff --git a/src/services/scanner.ts b/src/services/scanner.ts index 80348b44..e59e21db 100644 --- a/src/services/scanner.ts +++ b/src/services/scanner.ts @@ -67,9 +67,12 @@ export default class ScannerService { private _formatPartialFilepath(filepath: string): string { const original = path.parse(filepath); + const hasUnderscorePrefix = original.base[0] === '_'; + const base = hasUnderscorePrefix ? original.base : `_${original.base}`; + return path.format({ ...original, - base: '_' + original.base + base }); } }