summaryrefslogtreecommitdiffstats
path: root/lib/private/preview/office.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/preview/office.php')
-rw-r--r--lib/private/preview/office.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/preview/office.php b/lib/private/preview/office.php
index 269e1dad74e..882c4426e6d 100644
--- a/lib/private/preview/office.php
+++ b/lib/private/preview/office.php
@@ -15,9 +15,9 @@ if (extension_loaded('imagick')) {
// LibreOffice preview is currently not supported on Windows
if (!\OC_Util::runningOnWindows()) {
- $whichLibreOffice = ($isShellExecEnabled ? shell_exec('which libreoffice') : '');
+ $whichLibreOffice = ($isShellExecEnabled ? shell_exec('command -v libreoffice') : '');
$isLibreOfficeAvailable = !empty($whichLibreOffice);
- $whichOpenOffice = ($isShellExecEnabled ? shell_exec('which libreoffice') : '');
+ $whichOpenOffice = ($isShellExecEnabled ? shell_exec('command -v libreoffice') : '');
$isOpenOfficeAvailable = !empty($whichOpenOffice);
//let's see if there is libreoffice or openoffice on this machine
if($isShellExecEnabled && ($isLibreOfficeAvailable || $isOpenOfficeAvailable || is_string(\OC_Config::getValue('preview_libreoffice_path', null)))) {