Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Commit 577a067

Browse files
committed
Replace fork exportArchiveToArchive call
1 parent 28ff080 commit 577a067

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

dat/library.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const signatures = require('sodium-signatures')
66
const parseDatURL = require('parse-dat-url')
77
const _debounce = require('lodash.debounce')
88
const mkdirp = require('mkdirp')
9+
const pda = require('pauls-dat-api')
910
const scopedFSes = require('../lib/scoped-fses')
1011
const baseLogger = require('../logger').get()
1112
const logger = baseLogger.child({category: 'dat', subcategory: 'library'})
@@ -286,14 +287,12 @@ exports.forkArchive = async function forkArchive (srcArchiveUrl, manifest = {},
286287

287288
// copy files
288289
var ignore = ['/.dat', '/.git', '/dat.json']
289-
// TODO replace this
290-
console.warn('Fork did not copy data, exportArchiveToArchive() not yet implemented')
291-
// await daemon.exportArchiveToArchive({
292-
// srcArchive: datEncoding.toStr(srcArchive.key),
293-
// dstArchive: datEncoding.toStr(dstArchive.key),
294-
// skipUndownloadedFiles: true,
295-
// ignore
296-
// })
290+
await pda.exportArchiveToArchive({
291+
srcArchive,
292+
dstArchive,
293+
skipUndownloadedFiles: true,
294+
ignore
295+
})
297296

298297
// write a .datignore if DNE
299298
try {

0 commit comments

Comments
 (0)