Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-weisberg-qz committed Aug 21, 2024
1 parent e209cc9 commit 39dcf83
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,11 @@ function partOfApp(changedFiles: string[], app: App): boolean {
}

function getFirstTwoDirectories(filePath: string): string {
// Normalize the path to handle any inconsistencies
const normalizedPath = path.normalize(filePath);

// Split the path into parts based on the OS-specific separator
const parts = normalizedPath.split(path.sep).filter(Boolean); // filter(Boolean) removes empty strings

// Check if the path has at least two segments
if (parts.length < 2) {
return parts.join(path.sep); // Return the entire path if less than two directories
}

// Join the first two segments
return parts.slice(0, 2).join(path.sep);
}

Expand Down

0 comments on commit 39dcf83

Please sign in to comment.