owncloud / data_exporter

Export/Import for ownCloud user data
GNU General Public License v2.0
7 stars 5 forks source link

PHP Fatal error when installing in custom apps path #219

Open enbrnz opened 1 year ago

enbrnz commented 1 year ago

When installing data_exporter in /var/www/owncloud/custom any occ command fails with:

PHP Fatal error:  require(): Failed opening required '/mnt/data/apps/data_exporter/lib/../../../version.php' (include_path='/var/www/owncloud/apps:/var/www/owncloud/custom') in /mnt/data/apps/data_exporter/lib/Platform.php on line 51

Steps to reproduce

  1. Start standard ownCloud docker server container
  2. Install data_exporter in /mnt/data/apps (the docker container has a symlink in /var/www/owncloud/custom pointing to /mnt/data/apps)

Expected behaviour

Data exporter should work

Actual behaviour

Exception being thrown

jnweiger commented 1 year ago

data_exporter 0.2.1 works fine, when installed in /var/www/owncloud/apps-external/data_exporter

Was that with docker?

jnweiger commented 1 year ago

Trivial reproducer without docker:

Code in data_exporter/lib/Platform.php expects all apps folders to be in-core:

       public function __construct(IAppManager $appManager, $versionFile = __DIR__ . '/../../../version.php') {
                $this->loadVersion($versionFile);
                $this->appManager = $appManager;
        }