diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-04-30 16:56:09 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-21 13:19:17 +0200 |
commit | 5f403f3e920ea8f6ed5d0441762b3e4f4a9bd38e (patch) | |
tree | 1390f388645003b9d4e5ee3ff5adc63e3dd48b62 /lib/private/files/mount | |
parent | 319942bccb0f08abd694219b1c7bcf1e71d589c4 (diff) | |
download | nextcloud-server-5f403f3e920ea8f6ed5d0441762b3e4f4a9bd38e.tar.gz nextcloud-server-5f403f3e920ea8f6ed5d0441762b3e4f4a9bd38e.zip |
move the mount point up if a share is mounted to a subfolder and the subfolder no longer exists
Diffstat (limited to 'lib/private/files/mount')
-rw-r--r-- | lib/private/files/mount/mount.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/files/mount/mount.php b/lib/private/files/mount/mount.php index 256630726d2..d4a4e186fb9 100644 --- a/lib/private/files/mount/mount.php +++ b/lib/private/files/mount/mount.php @@ -59,6 +59,8 @@ class Mount { } /** + * get complete path to the mount point, relative to data/ + * * @return string */ public function getMountPoint() { @@ -66,6 +68,15 @@ class Mount { } /** + * get name of the mount point + * + * @return string + */ + public function getMountPointName() { + return basename(rtrim($this->mountPoint, '/')); + } + + /** * @param string $mountPoint new mount point */ public function setMountPoint($mountPoint) { |