Description: Fix extensions installation in user space
 Patch introduced for release 1.0~x~rc2. Forgot what the rationals are.
Author: Gilles Filippini <pini@debian.org>
Index: sikuli/API/src/main/java/org/sikuli/basics/ExtensionManager.java
===================================================================
--- sikuli.orig/API/src/main/java/org/sikuli/basics/ExtensionManager.java
+++ sikuli/API/src/main/java/org/sikuli/basics/ExtensionManager.java
@@ -58,12 +58,16 @@ public class ExtensionManager {
 			if (targetFile.exists()) {
 				targetFile.delete();
 			}
-			if (!localFile.renameTo(targetFile)) {
+			Runtime.getRuntime().exec("mv " + localFile.getAbsolutePath() + " " + targetFile.getAbsolutePath()).waitFor();
+			if( !targetFile.exists() ){
 				Debug.error("ExtensionManager: Failed to install " + localFile.getName() + " to " + targetFile.getAbsolutePath());
 				return false;
 			}
 			addExtension(name, localFile.getAbsolutePath(), version);
-		} catch (IOException e) {
+		// Java 7
+		// catch (IOException | InterruptException e) {
+		// Java 6
+		} catch (Exception e) {
 			Debug.error("ExtensionManager: Failed to download " + url);
 			return false;
 		}
