From 9936e4940966525087f3c39924630fee37a53399 Mon Sep 17 00:00:00 2001 From: Laszlo Magyar Date: Wed, 4 Sep 2024 00:06:23 +0200 Subject: [PATCH] SAF: disable move when renaming --- primitiveFTPd/src/org/primftpd/filesystem/SafFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitiveFTPd/src/org/primftpd/filesystem/SafFile.java b/primitiveFTPd/src/org/primftpd/filesystem/SafFile.java index e078a959..42bdd1b7 100644 --- a/primitiveFTPd/src/org/primftpd/filesystem/SafFile.java +++ b/primitiveFTPd/src/org/primftpd/filesystem/SafFile.java @@ -161,7 +161,7 @@ public boolean delete() { public boolean move(SafFile destination) { logger.trace("[{}] move({})", name, destination.getAbsolutePath()); - if (writable && documentFile != null) { + if (writable && documentFile != null && Utils.parent(this.absPath).equals(Utils.parent(destination.getAbsolutePath()))) { postClientAction(ClientActionEvent.ClientAction.RENAME); return documentFile.renameTo(destination.getName()); }