mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-25 14:05:03 +00:00
feat: resolved an issue without recursive matching
This commit is contained in:
@ -365,9 +365,8 @@ export const recursivelyGetSecretPaths = async ({
|
||||
folderId: p.folderId
|
||||
}));
|
||||
|
||||
const pathsInCurrentDirectory = paths.filter((folder) =>
|
||||
folder.path.startsWith(currentPath === "/" ? "" : currentPath)
|
||||
);
|
||||
// path relative will start with ../ if its outside directory
|
||||
const pathsInCurrentDirectory = paths.filter((folder) => !path.relative(currentPath, folder.path).startsWith(".."));
|
||||
|
||||
return pathsInCurrentDirectory;
|
||||
};
|
||||
|
Reference in New Issue
Block a user