Skip to content

Commit

Permalink
fix: sanitize collection names by removing invalid filesystem characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Pragadesh-45 committed Feb 7, 2025
1 parent 26eaec4 commit 48c1789
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bruno-electron/src/utils/filesystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ const searchForBruFiles = (dir) => {
};

const sanitizeCollectionName = (name) => {
return name.trim();
}
return name.trim().replace(/[<>:"/\\|?*]/g, "-");
};

const sanitizeDirectoryName = (name) => {
return name.replace(/[<>:"/\\|?*\x00-\x1F]+/g, '-').trim();
Expand Down

0 comments on commit 48c1789

Please sign in to comment.