Skip to content

Commit

Permalink
Merge pull request #102 from solid-contrib/solid-spec-v0.10
Browse files Browse the repository at this point in the history
const type
  • Loading branch information
bourgeoa authored Mar 3, 2024
2 parents be5a7e0 + dc5ba87 commit e2d4f4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions file/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ export class SolidRestFile {
let mimetype = await mime.lookup(fn); // mimetype from ext

const { type, metadata } = await this.itemType(fn); // Container/Resource and metadata
let itemType = type

let exists = await this.itemExists(fn);
if (!type && fn.endsWith('/')) type = "Container";
if (!type && fn.endsWith('/')) itemType = "Container";
let read = true, write = true;
if (exists) {
try {
Expand Down Expand Up @@ -143,7 +144,7 @@ export class SolidRestFile {
extension: mime.extension(fn),
mode: mode,
exists: exists,
isContainer: type === "Container" ? true : false,
isContainer: itemType === "Container" ? true : false,
mimetype: mimetype,
contentType: mimetype,
metadata: metadata
Expand Down

0 comments on commit e2d4f4b

Please sign in to comment.