Skip to content

If Android creates a different filename than requested delete the newly...

Erik Duisters requested to merge eduisters/kdeconnect-android:bug_406901 into master

Summary

When creating new files android replaces filenames it does not like with '_' and makes sure the newly created file has a unique filename by appending "(x)" to the filename. When moving or copying files using dolphin this causes empty files to be left behind on android because there is no way for dolphin to determine the newly create filename

BUG: 406901

Test Plan

Preparation:

Create a file with name "testfile :.txt" and write something into it so it's size is > 0

Before:

Try to copy or move this file using dolphin to the phone's internal or external storage.

Notice:

  • that an empty file is created with the name "testfile _.txt"
  • that the created file is empty
  • that dolphin shows an error about not being able to write to the file

Try to copy or move again
Notice:

  • that an empty file is created with the name "testfile _(1).txt"
  • that the created file is empty
  • that dolphin shows an error about not being able to write to the file

After:

Try to copy or move the file again
Notice:

  • that no file is created on android
  • that dolphin still shows an error about not being able to write to the file

Merge request reports

Loading