mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 06:28:33 +00:00
fix: rename folder case insensitive (#3635)
* fix: rename folder case insensitive * fix: add hasSubFolders utility and update folder moving logic for Windows OS * fix: validations * fix: updates * fix: updates --------- Co-authored-by: Pragadesh-45 <temporaryg7904@gmail.com>
This commit is contained in:
@@ -38,6 +38,12 @@ const isDirectory = (dirPath) => {
|
||||
}
|
||||
};
|
||||
|
||||
const hasSubFolders = (dir) => {
|
||||
console.log('Checking for subfolders in:', dir);
|
||||
const files = fs.readdirSync(dir);
|
||||
return files.some(file => fs.statSync(path.join(dir, file)).isDirectory());
|
||||
};
|
||||
|
||||
const normalizeAndResolvePath = (pathname) => {
|
||||
if (isSymbolicLink(pathname)) {
|
||||
const absPath = path.dirname(pathname);
|
||||
@@ -224,5 +230,6 @@ module.exports = {
|
||||
sanitizeDirectoryName,
|
||||
isWindowsOS,
|
||||
safeToRename,
|
||||
isValidFilename
|
||||
isValidFilename,
|
||||
hasSubFolders
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user