From 7bee3b6df02d4350eeaa9d608e6a97741d493731 Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Sat, 25 Apr 2015 22:22:56 +0200 Subject: [PATCH 1/2] LibreOffice config should be in instance temp folder Make sure that the LibreOffice configuration folder ends up in the temp folder of the instance --- lib/converter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/converter.php b/lib/converter.php index b60babc3..1667d528 100644 --- a/lib/converter.php +++ b/lib/converter.php @@ -49,7 +49,8 @@ class Converter { $params = ' --headless --convert-to ' . $targetFilter . ' --outdir ' . escapeshellarg($outdir) . ' --writer '. escapeshellarg($infile) - . ' -env:UserInstallation=file://' . escapeshellarg(get_temp_dir()) + . ' -env:UserInstallation=file://' + . escapeshellarg(get_temp_dir() . '/owncloud-' . \OC_Util::getInstanceId().'/') ; file_put_contents($infile, $input); From 41f7d890cf7be0d48088536a3268efa8800fcf88 Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Tue, 28 Apr 2015 11:42:33 +0200 Subject: [PATCH 2/2] Test using the config in the instance temp folder --- lib/config.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/config.php b/lib/config.php index 7879a50c..4d6f182f 100644 --- a/lib/config.php +++ b/lib/config.php @@ -28,7 +28,8 @@ class Config { $params = ' --headless --convert-to ' . escapeshellarg($targetFilter) . ' --outdir ' . escapeshellarg($outdir) . ' --writer '. escapeshellarg($infile) - . ' -env:UserInstallation=file://' . escapeshellarg(get_temp_dir()) . ' 2>&1' + . ' -env:UserInstallation=file://' + . escapeshellarg(get_temp_dir() . '/owncloud-' . \OC_Util::getInstanceId().'/') . ' 2>&1' ; file_put_contents($infile, $input); @@ -72,4 +73,4 @@ class Config { return \OCP\Config::setAppValue(self::APP_NAME, $key, $value); } -} \ No newline at end of file +}