Code Duplication    Length = 4-4 lines in 2 locations

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
	}

apps/files_sharing/lib/Helper.php 1 location

@@ 233-236 (lines=4) @@
230
		$name = $pathinfo['filename'];
231
		$dir = $pathinfo['dirname'];
232
		$i = 2;
233
		while ($view->file_exists($path) || in_array($path, $excludeList)) {
234
			$path = Filesystem::normalizePath($dir . '/' . $name . ' ('.$i.')' . $ext);
235
			$i++;
236
		}
237
238
		return $path;
239
	}