Skip to content

Commit

Permalink
Merge pull request #205 from kaczmarkiewiczp/dev
Browse files Browse the repository at this point in the history
Fix upload bug in serve webdav
  • Loading branch information
patrykcoding authored Aug 20, 2018
2 parents 913eaa8 + 0e07ef8 commit a850f40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,11 @@ public Process serveWebdav(RemoteItem remote, String servePath, int port) {
String path = (servePath.compareTo("//" + remoteName) == 0) ? remoteName + ":" + localRemotePath : remoteName + ":" + localRemotePath + servePath;
String[] command = createCommandWithOptions("serve", "webdav", "--addr", ":" + String.valueOf(port), path);

String cachePath = context.getCacheDir().getAbsolutePath();
String[] environmentalVariables = {"TMPDIR=" + cachePath}; // this is a fix for #199

try {
return Runtime.getRuntime().exec(command);
return Runtime.getRuntime().exec(command, environmentalVariables);
} catch (IOException e) {
e.printStackTrace();
return null;
Expand Down

0 comments on commit a850f40

Please sign in to comment.