Skip to content

Commit

Permalink
🩹 back: webdav now accepts PUTs of files
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlinagora committed Oct 15, 2024
1 parent f065a02 commit f0a9cdd
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,7 @@ export class Resource implements INepheleResource {
* The canonical name of the resource. (The basename of its path.)
*/
async getCanonicalName(): Promise<string> {
if (!(await this.exists())) throw new this.nephele.ResourceNotFoundError();

return this.file.name;
return this.pathname[this.pathname.length - 1];
}

/**
Expand All @@ -620,8 +618,6 @@ export class Resource implements INepheleResource {
* This should **not** be URL encoded.
*/
async getCanonicalPath(): Promise<string> {
if (!(await this.exists())) throw new this.nephele.ResourceNotFoundError();

return this.pathname.join("/");
}

Expand Down

0 comments on commit f0a9cdd

Please sign in to comment.