For example: If you have a file named ' ' (single space) in a folder, deleting the file will result in everything else in the folder being deleted. Deleting 'foo ' when both 'foo' and 'foo ' exist will result in the deletion of 'foo'. Both 'foo' and 'foo ' disappear from the view until a refresh.
Confirmed. That's... bad.
There's another issue: When removing " " inside $projectroot, KDevelop thinks that the whole project got removed and then closes the project: "The base folder of project X got deleted or moved outside of KDevelop. The project has to be closed."
Git commit 080ed286fe100f7c736d5a77c587e0a1b9453882 by Kevin Funk. Committed on 19/04/2017 at 09:56. Pushed by kfunk into branch '5.1'. Work-around issue in Path(QString) ctor Problem: Path(QString) will call Path(QUrl) constructor, constructing an url via QUrl::fromUserInput(...). Because QUrl::fromUserInput by default is in tolerant mode, Path("/tmp/ ") would be transformed into Path(QUrl("file:///tmp")) -> thus break the path. Consider this example: ``` #include <QDebug> #include <QUrl> int main() { auto u1 = QUrl::fromLocalFile("/tmp/ "); auto u2 = QUrl::fromUserInput("/tmp/ "); qDebug() << u1.toLocalFile(); qDebug() << u2.toLocalFile(); } ``` Will give: ``` main(8): "/tmp/ " main(9): "/tmp/" ``` TODO: We need another Path ctor when we are sure we want to pass a local file (e.g. by adding a static Path::fromLocalFile(...))? M +1 -1 project/abstractfilemanagerplugin.cpp https://commits.kde.org/kdevplatform/080ed286fe100f7c736d5a77c587e0a1b9453882
Git commit 76765692538d3af40374b0c9ae63eb6eb41c53c0 by Kevin Funk. Committed on 19/04/2017 at 09:56. Pushed by kfunk into branch '5.1'. backgroundparser: Relax assert a bit A file with just a space as file name is fine -- let's rather make sure we don't pass a folder instead of a file as url M +1 -1 language/backgroundparser/backgroundparser.cpp https://commits.kde.org/kdevplatform/76765692538d3af40374b0c9ae63eb6eb41c53c0
Issue from comment #2 is fixed by 080ed286fe100f7c736d5a77c587e0a1b9453882
There are more issues with files ending in space. When I click on one of them in the file tree manager, it opens a new window file with the space trimmed. Then, I save it and it creates a new file with the ending space trimmed.