diff --git a/lib/files.php b/lib/files.php
index cee273d95c93eaf15e1275138098d59925a6498a..d5bebb7e549af13a2f59a7fba3bc0603aaff3ae8 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -167,7 +167,7 @@ class OC_Files {
 	* @param file $target
 	*/
 	public static function move($sourceDir,$source,$targetDir,$target){
-		if(OC_User::isLoggedIn() && ($sourceDir != '' || $source != 'Shared') && !OC_Filesystem::file_exists($tagetDir.'/'.$target)){
+		if(OC_User::isLoggedIn() && ($sourceDir != '' || $source != 'Shared') && !OC_Filesystem::file_exists($targetDir.'/'.$target)){
 			$targetFile=self::normalizePath($targetDir.'/'.$target);
 			$sourceFile=self::normalizePath($sourceDir.'/'.$source);
 			return OC_Filesystem::rename($sourceFile,$targetFile);