mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
fix(core): windows backslashes in paths were leading to wrong URI being created leading to error upon execution deletion
This commit is contained in:
@@ -237,7 +237,7 @@ public class LocalStorage implements StorageInterface {
|
||||
Path prefix = (tenantId == null) ?
|
||||
basePath.toAbsolutePath() :
|
||||
Path.of(basePath.toAbsolutePath().toString(), tenantId);
|
||||
return URI.create("kestra:///" + prefix.relativize(path));
|
||||
return URI.create("kestra:///" + prefix.relativize(path).toString().replace("\\", "/"));
|
||||
}
|
||||
|
||||
private void parentTraversalGuard(URI uri) {
|
||||
|
||||
@@ -694,9 +694,10 @@ public class ExecutionController {
|
||||
throw new NoSuchElementException("Unable to find execution id '" + executionId + "'");
|
||||
}
|
||||
|
||||
Optional<Flow> flow = flowRepository.findById(execution.get().getTenantId(), execution.get().getNamespace(), execution.get().getFlowId());
|
||||
String flowId = execution.get().getFlowId();
|
||||
Optional<Flow> flow = flowRepository.findById(execution.get().getTenantId(), execution.get().getNamespace(), flowId);
|
||||
if (flow.isEmpty()) {
|
||||
throw new NoSuchElementException("Unable to find flow id '" + executionId + "'");
|
||||
throw new NoSuchElementException("Unable to find flow id '" + flowId + "'");
|
||||
}
|
||||
|
||||
String prefix = StorageContext
|
||||
|
||||
Reference in New Issue
Block a user