mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix anonymous full drive download
- Related to #1782 - Anonymous full drive download is now working - One known false positive in the test that should not be too bad (the behaviour stays the same)
This commit is contained in:
parent
4173174012
commit
f8442e9b98
@ -353,6 +353,21 @@ define([
|
||||
var filesData = data.sharedFolderId && ctx.sf[data.sharedFolderId] ? ctx.sf[data.sharedFolderId].filesData : ctx.data.filesData;
|
||||
var links = ctx.sf[data.sharedFolderId] && ctx.sf[data.sharedFolderId].static ? ctx.data.static && ctx.sf[data.sharedFolderId].static : ctx.data.static;
|
||||
|
||||
if (data.uo.curvePublic == undefined && Object.keys(ctx.data.root).length === 0) {
|
||||
// Anonymous Drive
|
||||
// In anonymous drive, there are no root folder in the data
|
||||
// We are going to emulate it
|
||||
// One false positive: empty team drive but the result is
|
||||
// functionally equivalent
|
||||
console.log("Anonymous drive"); // XXX: remove after testing phase
|
||||
ctx.data.root = {};
|
||||
let index = 0;
|
||||
Object.keys(ctx.data.filesData).forEach(file => {
|
||||
ctx.data.root[index] = file;
|
||||
index += 1;
|
||||
});
|
||||
}
|
||||
|
||||
progress('reading', -1); // Msg.settings_export_reading
|
||||
nThen(function (waitFor) {
|
||||
ctx.waitFor = waitFor;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user