fix: stopped filesystem from breaking at build
This commit is contained in:
parent
c08dec6743
commit
54a92c5d79
2 changed files with 5 additions and 3 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "flowos",
|
||||
"version": "1.1.0",
|
||||
"version": "2.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "flowos",
|
||||
"version": "1.1.0",
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-to-html": "^0.7.2",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { Directory, Errors, File, Permission, Stats } from '../types'
|
||||
import path from 'path'
|
||||
const p = path
|
||||
|
||||
export const defaultFS: { root: Directory } = {
|
||||
root: {
|
||||
|
|
@ -218,7 +220,7 @@ class VirtualFS {
|
|||
private async addMissingFiles (): Promise<void> {
|
||||
const addDirectoryRecursive = async (directory: Directory, directoryPath: string): Promise<void> => {
|
||||
for (const [key, value] of Object.entries(directory.children)) {
|
||||
const path = (await import('path')).join(directoryPath, key)
|
||||
const path = p.join(directoryPath, key)
|
||||
if (value.type === 'directory') {
|
||||
if (!await this.exists(path)) {
|
||||
await this.mkdir(path)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue