chore: make webfs usable
This commit is contained in:
@@ -16,9 +16,13 @@ export class Rm extends Program {
|
||||
let item: Item
|
||||
|
||||
try {
|
||||
item = await Item.openDir(args[1])
|
||||
item = await Item.openDir(args[1].startsWith('/')
|
||||
? args[1]
|
||||
: `${workdir.GetPath()}${workdir.GetPath().endsWith('/') ? '' : '/'}${args[1]}`)
|
||||
} catch {
|
||||
item = await Item.open(args[1])
|
||||
item = await Item.open(args[1].startsWith('/')
|
||||
? args[1]
|
||||
: `${workdir.GetPath()}${workdir.GetPath().endsWith('/') ? '' : '/'}${args[1]}`)
|
||||
}
|
||||
|
||||
if (!(await item.Exists())) {
|
||||
|
||||
Reference in New Issue
Block a user