mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[bug] Fix file collection with setting FileConverter.converter.errorfiles
This commit is contained in:
committed by
Sergey Konovalov
parent
a46493dd1a
commit
b49d931115
@ -563,20 +563,20 @@ function* streamEnd(streamObj, text) {
|
||||
streamObj.writeStream.end(text, 'utf8');
|
||||
yield utils.promiseWaitClose(streamObj.writeStream);
|
||||
}
|
||||
function* processUploadToStorage(ctx, dir, storagePath) {
|
||||
function* processUploadToStorage(ctx, dir, storagePath, opt_specialDirDst) {
|
||||
var list = yield utils.listObjects(dir);
|
||||
if (list.length < MAX_OPEN_FILES) {
|
||||
yield* processUploadToStorageChunk(ctx, list, dir, storagePath);
|
||||
yield* processUploadToStorageChunk(ctx, list, dir, storagePath, opt_specialDirDst);
|
||||
} else {
|
||||
for (var i = 0, j = list.length; i < j; i += MAX_OPEN_FILES) {
|
||||
yield* processUploadToStorageChunk(ctx, list.slice(i, i + MAX_OPEN_FILES), dir, storagePath);
|
||||
yield* processUploadToStorageChunk(ctx, list.slice(i, i + MAX_OPEN_FILES), dir, storagePath, opt_specialDirDst);
|
||||
}
|
||||
}
|
||||
}
|
||||
function* processUploadToStorageChunk(ctx, list, dir, storagePath) {
|
||||
function* processUploadToStorageChunk(ctx, list, dir, storagePath, opt_specialDirDst) {
|
||||
yield Promise.all(list.map(function (curValue) {
|
||||
let localValue = storagePath + '/' + curValue.substring(dir.length + 1);
|
||||
return storage.uploadObject(ctx, localValue, curValue);
|
||||
return storage.uploadObject(ctx, localValue, curValue, opt_specialDirDst);
|
||||
}));
|
||||
}
|
||||
function writeProcessOutputToLog(ctx, childRes, isDebug) {
|
||||
|
||||
Reference in New Issue
Block a user