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 2914e56
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,7 @@ export class Resource implements INepheleResource {
try {
return this.file.last_version_cache.id;
} catch (err) {
// console.log("No Version Cache for ", this);
return "none";
return "";
}
}

Expand All @@ -609,9 +608,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 +617,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 2914e56

Please sign in to comment.