Skip to content

Commit fb8cd44

Browse files
committed
chore: fixed no directory not working
1 parent 686b339 commit fb8cd44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/Storage.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export abstract class Storage<O extends StorageOptions = any> {
5353

5454
public pathAbs(path: string) {
5555
const pathNormalized = path.charAt(0) === '/' ? path.substring(1) : path
56-
return `${this.directoryNormalized}/${pathNormalized}`
56+
return this.directoryNormalized.length > 0
57+
? `${this.directoryNormalized}/${pathNormalized}`
58+
: pathNormalized
5759
}
5860
}

0 commit comments

Comments
 (0)