Skip to content

Commit

Permalink
Remove posix, as it doesn't do what I thought.
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Feb 26, 2021
1 parent dd6d55c commit 5202a3f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,12 @@ export class Util {
return targetPath;
}

//remove the filename
let containingFolder = path.posix.normalize(path.dirname(sourcePkgPath));
//start with the containing folder, split by slash
let result = containingFolder.split('/');
const containingFolder = path.dirname(sourcePkgPath);
let result = containingFolder.split(/[\\/]/);

//split on slash
let targetParts = path.posix.normalize(targetPath).split('/');
let targetParts = targetPath.split(/[\\/]/);

for (let part of targetParts) {
if (part === '' || part === '.') {
Expand Down

0 comments on commit 5202a3f

Please sign in to comment.