Code Duplication    Length = 8-8 lines in 2 locations

apps/files/ajax/newfile.php 1 location

@@ 75-82 (lines=8) @@
72
	exit();
73
}
74
75
if (!\OC\Files\Filesystem::file_exists($dir . '/')) {
76
	$result['data'] = array('message' => (string)$l10n->t(
77
			'The target folder has been moved or deleted.'),
78
			'code' => 'targetnotfound'
79
		);
80
	OCP\JSON::error($result);
81
	exit();
82
}
83
84
$target = $dir.'/'.$filename;
85

apps/files/ajax/newfolder.php 1 location

@@ 33-40 (lines=8) @@
30
	exit();
31
}
32
33
if (!\OC\Files\Filesystem::file_exists($dir . '/')) {
34
	$result['data'] = array('message' => (string)$l10n->t(
35
			'The target folder has been moved or deleted.'),
36
			'code' => 'targetnotfound'
37
		);
38
	OCP\JSON::error($result);
39
	exit();
40
}
41
42
$target = $dir . '/' . $foldername;
43