Skip to content

Commit

Permalink
0002471: Wrapper logs incorrect current working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Dec 22, 2015
1 parent d7fa4b8 commit 3737073
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -20,6 +20,7 @@
*/
package org.jumpmind.symmetric.wrapper;

import java.io.File;
import java.lang.reflect.Field;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -61,6 +62,11 @@ public class WindowsService extends WrapperService {

@Override
protected boolean setWorkingDirectory(String dir) {
try {
System.setProperty("user.dir", new File(dir).getCanonicalPath());
} catch (Exception e) {
throw new RuntimeException(e);
}
return Kernel32Ex.INSTANCE.SetCurrentDirectory(dir);
}

Expand Down

0 comments on commit 3737073

Please sign in to comment.