From c7a4f76f2bf53eb6a26670fd79b8fff920309c85 Mon Sep 17 00:00:00 2001 From: Erik Duisters Date: Wed, 1 May 2019 11:17:29 +0000 Subject: [PATCH] If Android creates a different filename than requested delete the newly created file and return false --- .../kde/kdeconnect/Plugins/SftpPlugin/AndroidSafSshFile.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/kde/kdeconnect/Plugins/SftpPlugin/AndroidSafSshFile.java b/src/org/kde/kdeconnect/Plugins/SftpPlugin/AndroidSafSshFile.java index f446039b..27f406af 100644 --- a/src/org/kde/kdeconnect/Plugins/SftpPlugin/AndroidSafSshFile.java +++ b/src/org/kde/kdeconnect/Plugins/SftpPlugin/AndroidSafSshFile.java @@ -189,6 +189,10 @@ public class AndroidSafSshFile implements SshFile { if (uri != null) { documentInfo = new DocumentInfo(fileSystemView.context, uri); + if (!name.equals(documentInfo.displayName)) { + delete(); + return false; + } } } catch (FileNotFoundException ignored) {}