mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-5524 rm resource validation fix (#3091)
This commit is contained in:
+3
@@ -437,6 +437,9 @@ public class LocalResourceController extends BaseLocalResourceController {
|
||||
if (Files.exists(newTargetPath)) {
|
||||
throw new DBException("Resource with name %s already exists".formatted(newTargetPath.getFileName()));
|
||||
}
|
||||
if (!Files.exists(newTargetPath.getParent())) {
|
||||
throw new DBException("Resource %s doesn't exists".formatted(newTargetPath.getParent().getFileName()));
|
||||
}
|
||||
try {
|
||||
Files.move(oldTargetPath, newTargetPath);
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user