Skip to content

Commit 7fe7ecb

Browse files
committed
NC | _parse_key_from_line remove redundant / at the beginning of the file key
Signed-off-by: Romy <[email protected]> (cherry picked from commit 4970b45)
1 parent 443def3 commit 7fe7ecb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/manage_nsfs/nc_lifecycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ class NCLifecycle {
14591459
_parse_key_from_line(entry, bucket_json) {
14601460
const line_array = entry.path.split(' ');
14611461
const file_path = line_array[line_array.length - 1];
1462-
let file_key = file_path.replace(bucket_json.path, '');
1462+
let file_key = file_path.replace(path.join(bucket_json.path, '/'), '');
14631463
const basename = path.basename(file_key);
14641464
if (basename.startsWith(config.NSFS_FOLDER_OBJECT_NAME)) {
14651465
file_key = path.join(path.dirname(file_key), '/');

0 commit comments

Comments
 (0)