refactor(urlSigner): Improve file search logic for getFileUrlsWithSign function
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
## v1.6.35 (2025-12-22)
|
||||
|
||||
### Refactor
|
||||
|
||||
- refactor: Improve file search logic for getFileUrlsWithSign function (e2991f9)
|
||||
|
||||
## v1.6.34 (2025-12-22)
|
||||
|
||||
### Feat
|
||||
|
||||
@@ -54,7 +54,7 @@ async function getFileUrlsWithSign(
|
||||
const cleanPath = fullRelativePath.startsWith("/")
|
||||
? fullRelativePath.substring(1)
|
||||
: fullRelativePath;
|
||||
|
||||
|
||||
const dirName = path.dirname(cleanPath);
|
||||
const fileName = path.basename(cleanPath);
|
||||
|
||||
@@ -66,7 +66,9 @@ async function getFileUrlsWithSign(
|
||||
try {
|
||||
const files = await getFileList(config, searchPath);
|
||||
// Check current directory
|
||||
let foundFile = files.find((f: any) => f.name === fileName && !f.is_dir);
|
||||
let foundFile = files.find(
|
||||
(f: any) => f.name === fileName && !f.is_dir
|
||||
);
|
||||
if (foundFile) {
|
||||
return foundFile;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user