Skip to content

Commit

Permalink
Merge pull request #477 from ONLYOFFICE/fix/bugfix
Browse files Browse the repository at this point in the history
Fix/bugfix
  • Loading branch information
K0R0L authored Jun 16, 2024
2 parents 8a25935 + 87f2847 commit d4ac980
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Common/sources/storage-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async function deleteObject(storageCfg, strPath) {

async function deletePath(storageCfg, strPath) {
const fsPath = getFilePath(storageCfg, strPath);
return rm(fsPath, {force: true, recursive: true});
return rm(fsPath, {force: true, recursive: true, maxRetries: 3});
}

async function getSignedUrl(ctx, storageCfg, baseUrl, strPath, urlType, optFilename, opt_creationDate) {
Expand Down
2 changes: 1 addition & 1 deletion DocService/sources/canvasservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,7 @@ exports.saveFromChanges = function(ctx, docId, statusInfo, optFormat, opt_userId
async function processWopiSaveAs(ctx, cmd) {
const info = await docsCoServer.getCallback(ctx, cmd.getDocId(), cmd.getUserIndex());
// info.wopiParams is null if it is not wopi
if (info.wopiParams) {
if (info?.wopiParams) {
const suggestedTargetType = `.${formatChecker.getStringFromFormat(cmd.getOutputFormat())}`;
const storageFilePath = `${cmd.getSaveKey()}/${cmd.getOutputPath()}`;
const stream = await storage.createReadStream(ctx, storageFilePath);
Expand Down
5 changes: 3 additions & 2 deletions DocService/sources/converterservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ function convertRequest(req, res, isJson) {
}
let filetype = params.filetype || params.fileType || '';
let outputtype = params.outputtype || params.outputType || '';
let docId = 'conv_' + params.key + '_' + outputtype;
ctx.setDocId(docId);
ctx.setDocId(params.key);

if (params.key && !constants.DOC_ID_REGEX.test(params.key)) {
ctx.logger.warn('convertRequest unexpected key = %s', params.key);
Expand Down Expand Up @@ -291,6 +290,8 @@ function convertRequest(req, res, isJson) {
outputFormat = constants.AVS_OFFICESTUDIO_FILE_DOCUMENT_OFORM_PDF;
}
}
//todo use hash of params as id
let docId = 'conv_' + params.key + '_' + outputFormat;
var cmd = new commonDefines.InputCommand();
cmd.setCommand('conv');
cmd.setUrl(params.url);
Expand Down

0 comments on commit d4ac980

Please sign in to comment.