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

Commit 5dcafde

Browse files
committed
Replace fork exportArchiveToArchive call
1 parent 77eb588 commit 5dcafde

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

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'})
@@ -276,14 +277,12 @@ exports.forkArchive = async function forkArchive (srcArchiveUrl, manifest = {},
276277

277278
// copy files
278279
var ignore = ['/.dat', '/.git', '/dat.json']
279-
// TODO replace this
280-
console.warn('Fork did not copy data, exportArchiveToArchive() not yet implemented')
281-
// await daemon.exportArchiveToArchive({
282-
// srcArchive: datEncoding.toStr(srcArchive.key),
283-
// dstArchive: datEncoding.toStr(dstArchive.key),
284-
// skipUndownloadedFiles: true,
285-
// ignore
286-
// })
280+
await pda.exportArchiveToArchive({
281+
srcArchive,
282+
dstArchive,
283+
skipUndownloadedFiles: true,
284+
ignore
285+
})
287286

288287
// write a .datignore if DNE
289288
try {

0 commit comments

Comments
 (0)