pinokiod 0.1.70 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/api/fs/index.js +3 -1
- package/package.json +1 -1
package/kernel/api/fs/index.js
CHANGED
|
@@ -102,7 +102,6 @@ class FS {
|
|
|
102
102
|
ondata({ raw: "\r\ncreating a shared drive:\r\n" + JSON.stringify(req.params, null, 2).replace(/\n/g, "\r\n") })
|
|
103
103
|
|
|
104
104
|
if (req.params.drive) {
|
|
105
|
-
if (req.params.peers
|
|
106
105
|
const drivePath = kernel.path("drive")
|
|
107
106
|
const drive = new Pdrive(drivePath)
|
|
108
107
|
for(const route in req.params.drive) {
|
|
@@ -157,6 +156,7 @@ class FS {
|
|
|
157
156
|
// await fs.promises.rm(filepath)
|
|
158
157
|
ondata({ raw: "\r\nremoving:\r\n" + filepath + "\r\n" })
|
|
159
158
|
await rimraf(filepath)
|
|
159
|
+
ondata({ raw: "done\r\n" })
|
|
160
160
|
}
|
|
161
161
|
async copy(req, ondata, kernel) {
|
|
162
162
|
let cwd = (req.cwd ? req.cwd : kernel.api.userdir)
|
|
@@ -165,6 +165,7 @@ class FS {
|
|
|
165
165
|
let options = req.params.options
|
|
166
166
|
ondata({ raw: "\r\ncopying:\r\nfrom: " + src + "\r\nto: " + dest + "\r\n" })
|
|
167
167
|
await fs.promises.cp(src, dest, options)
|
|
168
|
+
ondata({ raw: "done\r\n" })
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
async init(req, kernel) {
|
|
@@ -390,6 +391,7 @@ class FS {
|
|
|
390
391
|
console.log("trying", number)
|
|
391
392
|
await this._download(req, ondata, kernel)
|
|
392
393
|
console.log("success")
|
|
394
|
+
ondata({ raw: "\r\nDone\r\n" })
|
|
393
395
|
}, {
|
|
394
396
|
retries: 10,
|
|
395
397
|
factor: 2
|