Code Duplication    Length = 4-4 lines in 2 locations

apps/files_sharing/lib/helper.php 1 location

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

apps/files_sharing/lib/sharedmount.php 1 location

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