Don't clear legacy directories anymore

This commit is contained in:
crschnick 2024-05-26 20:33:40 +00:00
parent 73524d471f
commit ec5342e50f

View file

@ -65,14 +65,14 @@ public class ShellTemp {
throw ErrorEvent.expected(new IOException("No permissions to access %s".formatted(systemTemp)));
}
// We don't do this anymore, we hope that all the legacy directories have been cleared now
// Always delete legacy directory and do not care whether it partially fails
// This system xpipe temp directory might contain other files on the local machine, so only clear the exec
d.deleteFileOrDirectory(proc, systemTemp.join("xpipe", "exec").toString())
.executeAndCheck();
var home = proc.getOsType().getHomeDirectory(proc);
d.deleteFileOrDirectory(proc, FileNames.join(home, ".xpipe", "temp")).executeAndCheck();
d.deleteFileOrDirectory(proc, FileNames.join(home, ".xpipe", "system_id"))
.executeAndCheck();
// d.deleteFileOrDirectory(proc, systemTemp.join("xpipe", "exec").toString()).executeAndCheck();
// var home = proc.getOsType().getHomeDirectory(proc);
// d.deleteFileOrDirectory(proc, FileNames.join(home, ".xpipe", "temp")).executeAndCheck();
// d.deleteFileOrDirectory(proc, FileNames.join(home, ".xpipe", "system_id")).executeAndCheck();
}
private static boolean checkDirectoryPermissions(ShellControl proc, String dir) throws Exception {