Code Duplication    Length = 4-4 lines in 2 locations

apps/files_sharing/lib/Helper.php 1 location

@@ 269-272 (lines=4) @@
266
		$name = $pathinfo['filename'];
267
		$dir = $pathinfo['dirname'];
268
		$i = 2;
269
		while ($view->file_exists($path) || in_array($path, $excludeList)) {
270
			$path = Filesystem::normalizePath($dir . '/' . $name . ' ('.$i.')' . $ext);
271
			$i++;
272
		}
273
274
		return $path;
275
	}

apps/files_sharing/lib/SharedMount.php 1 location

@@ 136-139 (lines=4) @@
133
		};
134
135
		$i = 2;
136
		while ($view->file_exists($path) || $mountpointExists($path)) {
137
			$path = Filesystem::normalizePath($dir . '/' . $name . ' ('.$i.')' . $ext);
138
			$i++;
139
		}
140
141
		return $path;
142
	}