Skip to content

Commit

Permalink
Update webdavHandler.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aigem authored Sep 11, 2024
1 parent d8291a3 commit e6f2778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handlers/webdavHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function handleDirectory(bucket: R2Bucket, resource_path: string, bucketNa
if (object.key === resource_path) continue;
const isDirectory = object.customMetadata?.resourcetype === "";
const displayName = object.key.split('/').pop() || object.key;
const href = `/${bucketName}/${object.key + (isDirectory ? "/" : "")}`;
const href = `/${object.key + (isDirectory ? "/" : "")}`;
items.push({ name: `${isDirectory ? '📁 ' : '📄 '}${displayName}`, href });
}
} catch (error) {
Expand Down Expand Up @@ -289,4 +289,4 @@ async function handleMove(request: Request, bucket: R2Bucket): Promise<Response>
headers: { "Content-Type": "text/html; charset=utf-8" }
});
}
}
}

0 comments on commit e6f2778

Please sign in to comment.