Skip to content

Commit

Permalink
improve: remove redundant codes
Browse files Browse the repository at this point in the history
  • Loading branch information
jooy2 committed May 13, 2024
1 parent c3bfa43 commit 5d881c0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,7 @@ export default class FsMan {
return FsMan.toValidFilePath(win32.join(...paths), true);
}

let fullPath = '';

for (let i = 0, iLen = paths.length; i < iLen; i += 1) {
fullPath = `${fullPath}/${paths[i]}`;
}

return FsMan.toValidFilePath(fullPath, false);
return FsMan.toValidFilePath(paths.join('/'), false);
}

static getFilePathLevel(filePath: string): number {
Expand Down

0 comments on commit 5d881c0

Please sign in to comment.