diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index ea2b1b10d63012480eddab947faf9109dea899ea..eb18507b4d536d384e510ef575840d64b3637d99 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -1493,10 +1493,11 @@ class Util {
 	 * @return boolean
 	 */
 	public function isSystemWideMountPoint($path) {
+		$normalizedPath = ltrim($path, '/');
 		if (\OCP\App::isEnabled("files_external")) {
 			$mount = \OC_Mount_Config::getSystemMountPoints();
 			foreach ($mount as $mountPoint => $data) {
-				if ($mountPoint == substr($path, 1, strlen($mountPoint))) {
+				if ($mountPoint == substr($normalizedPath, 0, strlen($mountPoint))) {
 					return true;
 				}
 			}