From 306eda5c8a6ee4f3451fe3023a0449c668bb4348 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 18 Jul 2012 10:48:56 +0000 Subject: [PATCH] * make sure to resolve relative paths NativeRenameAction --- installer/msi/filebot.launcher.l4j.ini | 11 +++++++---- installer/msi/filebot.platform.launcher.l4j.ini | 15 +++++++++------ installer/portable/FileBot.l4j.ini | 11 +++++++---- .../sourceforge/filebot/NativeRenameAction.java | 4 ++-- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/installer/msi/filebot.launcher.l4j.ini b/installer/msi/filebot.launcher.l4j.ini index 2279a3f0..c7a44b4c 100644 --- a/installer/msi/filebot.launcher.l4j.ini +++ b/installer/msi/filebot.launcher.l4j.ini @@ -2,16 +2,19 @@ -Dapplication.deployment=msi -Dapplication.dir="%APPDATA%\FileBot" -# memory settings --Xmx256m - # proxy settings # -Dhttp.proxyHost=localhost # -Dhttp.proxyPort=8888 -# do not use native shell for move/copy operations +# disable analytics +# -no-analytics + +# use native shell for move/copy operations -DuseNativeShell=true +# memory settings +-Xmx256m + # http connection timeouts -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 diff --git a/installer/msi/filebot.platform.launcher.l4j.ini b/installer/msi/filebot.platform.launcher.l4j.ini index aa7ce2fb..640d87a7 100644 --- a/installer/msi/filebot.platform.launcher.l4j.ini +++ b/installer/msi/filebot.platform.launcher.l4j.ini @@ -6,16 +6,19 @@ -DthreadPool=8 -Dunixfs=false -# memory settings --Xms64m --Xmx512m +# proxy settings +# -Dhttp.proxyHost=localhost +# -Dhttp.proxyPort=8888 + +# disable analytics +# -no-analytics # do not use native shell for move/copy operations -DuseNativeShell=false -# proxy settings -# -Dhttp.proxyHost=localhost -# -Dhttp.proxyPort=8888 +# memory settings +-Xms64m +-Xmx512m # http connection timeouts -Dsun.net.client.defaultConnectTimeout=5000 diff --git a/installer/portable/FileBot.l4j.ini b/installer/portable/FileBot.l4j.ini index 5deb598d..eb1ffed6 100644 --- a/installer/portable/FileBot.l4j.ini +++ b/installer/portable/FileBot.l4j.ini @@ -3,16 +3,19 @@ -Dapplication.dir="%EXEDIR%" -Duser.home="%EXEDIR%" -# memory settings --Xmx256m - # proxy settings # -Dhttp.proxyHost=localhost # -Dhttp.proxyPort=8888 -# do not use native shell for move/copy operations +# disable analytics +# -no-analytics + +# use native shell for move/copy operations -DuseNativeShell=true +# memory settings +-Xmx256m + # http connection timeouts -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=25000 diff --git a/source/net/sourceforge/filebot/NativeRenameAction.java b/source/net/sourceforge/filebot/NativeRenameAction.java index c2ccb918..6742ee5d 100644 --- a/source/net/sourceforge/filebot/NativeRenameAction.java +++ b/source/net/sourceforge/filebot/NativeRenameAction.java @@ -40,7 +40,7 @@ public enum NativeRenameAction implements RenameAction { int i = 0; for (Entry it : map.entrySet()) { src[i] = it.getKey().getCanonicalPath(); - dst[i] = it.getValue().getCanonicalPath(); + dst[i] = resolveDestination(it.getKey(), it.getValue()).getCanonicalPath(); i++; } @@ -51,7 +51,7 @@ public enum NativeRenameAction implements RenameAction { op.pFrom = new WString(op.encodePaths(src)); op.pTo = new WString(op.encodePaths(dst)); - System.out.println("NativeRenameAction.rename()"); + Shell32.INSTANCE.SHFileOperation(op); if (op.fAnyOperationsAborted) {