Fixes #563
This commit is contained in:
parent
95301a41ff
commit
1d7dc04f54
@ -54,8 +54,8 @@ export class DiskSpacePrimitives implements SpacePrimitives {
|
||||
data,
|
||||
meta: {
|
||||
name: name,
|
||||
created: s.birthtime!.getTime(),
|
||||
lastModified: s.mtime!.getTime(),
|
||||
created: s.birthtime?.getTime() || s.mtime?.getTime() || 0,
|
||||
lastModified: s.mtime?.getTime() || 0,
|
||||
perm: "rw",
|
||||
size: s.size,
|
||||
contentType: contentType,
|
||||
@ -109,8 +109,8 @@ export class DiskSpacePrimitives implements SpacePrimitives {
|
||||
name: name,
|
||||
size: s.size,
|
||||
contentType: lookupContentType(name),
|
||||
created: s.birthtime!.getTime(),
|
||||
lastModified: s.mtime!.getTime(),
|
||||
created: s.birthtime?.getTime() || s.mtime?.getTime() || 0,
|
||||
lastModified: s.mtime?.getTime() || 0,
|
||||
perm: "rw",
|
||||
};
|
||||
} catch {
|
||||
@ -147,8 +147,8 @@ export class DiskSpacePrimitives implements SpacePrimitives {
|
||||
}
|
||||
allFiles.push({
|
||||
name: normalizeForwardSlashPath(name),
|
||||
created: s.birthtime!.getTime(),
|
||||
lastModified: s.mtime!.getTime(),
|
||||
created: s.birthtime?.getTime() || s.mtime?.getTime() || 0,
|
||||
lastModified: s.mtime?.getTime() || 0,
|
||||
contentType: mime.getType(fullPath) || "application/octet-stream",
|
||||
size: s.size,
|
||||
perm: "rw",
|
||||
|
@ -34,8 +34,8 @@ export default function fileSystemSyscalls(root = "/"): SysCallMapping {
|
||||
const s = await Deno.stat(p);
|
||||
return {
|
||||
name: filePath,
|
||||
created: s.birthtime!.getTime(),
|
||||
lastModified: s.mtime!.getTime(),
|
||||
created: s.birthtime?.getTime() || s.mtime?.getTime() || 0,
|
||||
lastModified: s.mtime?.getTime() || 0,
|
||||
contentType: mime.getType(filePath) || "application/octet-stream",
|
||||
size: s.size,
|
||||
perm: "rw",
|
||||
@ -57,8 +57,8 @@ export default function fileSystemSyscalls(root = "/"): SysCallMapping {
|
||||
const s = await Deno.stat(p);
|
||||
return {
|
||||
name: filePath,
|
||||
created: s.birthtime!.getTime(),
|
||||
lastModified: s.mtime!.getTime(),
|
||||
created: s.birthtime?.getTime() || s.mtime?.getTime() || 0,
|
||||
lastModified: s.mtime?.getTime() || 0,
|
||||
contentType: mime.getType(filePath) || "application/octet-stream",
|
||||
size: s.size,
|
||||
perm: "rw",
|
||||
@ -86,8 +86,8 @@ export default function fileSystemSyscalls(root = "/"): SysCallMapping {
|
||||
const s = await Deno.stat(fullPath);
|
||||
allFiles.push({
|
||||
name: fullPath.substring(dirPath.length + 1),
|
||||
created: s.birthtime!.getTime(),
|
||||
lastModified: s.mtime!.getTime(),
|
||||
created: s.birthtime?.getTime() || s.mtime?.getTime() || 0,
|
||||
lastModified: s.mtime?.getTime() || 0,
|
||||
contentType: mime.getType(fullPath) || "application/octet-stream",
|
||||
size: s.size,
|
||||
perm: "rw",
|
||||
|
@ -23,7 +23,6 @@ export async function renderTemplate(
|
||||
removeTags: ["template"],
|
||||
});
|
||||
templateText = renderToText(tree).trimStart();
|
||||
// console.log(`Trimmed template: |${templateText}|`);
|
||||
// If a 'frontmatter' key was specified in the frontmatter, use that as the frontmatter
|
||||
if (frontmatter.frontmatter) {
|
||||
if (typeof frontmatter.frontmatter === "string") {
|
||||
|
Loading…
Reference in New Issue
Block a user