Code Duplication    Length = 4-4 lines in 2 locations

apps/files_sharing/lib/helper.php 1 location

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

apps/files_sharing/lib/sharedmount.php 1 location

@@ 121-124 (lines=4) @@
118
		};
119
120
		$i = 2;
121
		while ($view->file_exists($path) || $mountpointExists($path)) {
122
			$path = Filesystem::normalizePath($dir . '/' . $name . ' ('.$i.')' . $ext);
123
			$i++;
124
		}
125
126
		return $path;
127
	}