ONLYOFFICE / DocumentBuilder

ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
https://www.onlyoffice.com/document-builder.aspx
GNU Affero General Public License v3.0
111 stars 56 forks source link

When using docbuilder files, temporary files are not deleted when done #112

Open petrw opened 1 year ago

petrw commented 1 year ago

Steps to reproduce the problem:

When is used docbuilder file for document conversion from XLSX to CSV, in OS temp folder (in this case /tmp) are left ascXXXXXX folders (where is X is random lower/upper case character). This happens when is called builder.SetTmpFolder at start of the script and this setting seems to be mostly respected for other temporary files.

Sample docbuilder file

builder.SetTmpFolder("/home/user/temp");
builder.OpenFile("/home/user/multiple_sheets.xlsx", "");
var sheets = Api.GetSheets();
sheets[0].SetActive();
builder.SaveFile("csv", "/home/user/out.csv", "");
builder.CloseFile();

DocumentBuilder version: 7.3.3, 7.4.0, Linux x86_64

Installation method: Extracted RPM contents

Operating system: CentOS 7, Ubuntu 20.04, likely others