Only use realpath for real directories (#26058)
Only use realpath for real directories (#26058)

In some cross-local-storage use cases, the Local storage is
instantiated with "/" as data directory. In such cases, calling
realpath() would cause PHP warnings when open_basedir is set.

This fix bypasses the realpath() call when dealing with a root storage.

Downstreaming of https://github.com/owncloud/core/pull/26058

Signed-off-by: Lukas Reschke <65adda4326914576405c9e3a62f4904d96573863@statuscode.ch>

pmattern/server,endsguy/server,xx621998xx/server,Ardinis/server,jbicha/server,whitekiba/server,whitekiba/server,nextcloud/server,whitekiba/server,michaelletzgus/nextcloud-server,endsguy/server,nextcloud/server,jbicha/server,pmattern/server,jbicha/server,andreas-p/nextcloud-server,xx621998xx/server,pixelipo/server,jbicha/server,xx621998xx/server,whitekiba/server,andreas-p/nextcloud-server,michaelletzgus/nextcloud-server,nextcloud/server,andreas-p/nextcloud-server,Ardinis/server,whitekiba/server,pmattern/server,andreas-p/nextcloud-server,Ardinis/server,pmattern/server,pixelipo/server,jbicha/server,Ardinis/server,nextcloud/server,xx621998xx/server,pixelipo/server,andreas-p/nextcloud-server,xx621998xx/server,endsguy/server,pmattern/server,pixelipo/server,michaelletzgus/nextcloud-server,endsguy/server,endsguy/server,pixelipo/server,Ardinis/server,michaelletzgus/nextcloud-server