Skip to content

Commit a850f40

Browse files
authored
Merge pull request #205 from kaczmarkiewiczp/dev
Fix upload bug in serve webdav
2 parents 913eaa8 + 0e07ef8 commit a850f40

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,11 @@ public Process serveWebdav(RemoteItem remote, String servePath, int port) {
373373
String path = (servePath.compareTo("//" + remoteName) == 0) ? remoteName + ":" + localRemotePath : remoteName + ":" + localRemotePath + servePath;
374374
String[] command = createCommandWithOptions("serve", "webdav", "--addr", ":" + String.valueOf(port), path);
375375

376+
String cachePath = context.getCacheDir().getAbsolutePath();
377+
String[] environmentalVariables = {"TMPDIR=" + cachePath}; // this is a fix for #199
378+
376379
try {
377-
return Runtime.getRuntime().exec(command);
380+
return Runtime.getRuntime().exec(command, environmentalVariables);
378381
} catch (IOException e) {
379382
e.printStackTrace();
380383
return null;

0 commit comments

Comments
 (0)