| Summary: | Unable to open a file ending in :0 from an sftp: location | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | TrianguloY <correo--correo+kde> |
| Component: | application | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | christoph, correo--correo+kde |
| Priority: | NOR | ||
| Version First Reported In: | 24.02.2 | ||
| Target Milestone: | --- | ||
| Platform: | Neon | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/kate/-/commit/d8efd6c1ce34e14aed4b28d6f848fca65259fe3e | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
TrianguloY
2024-05-17 15:53:11 UTC
I apologize, the reported command was missing the kate action. I can't see how to edit the original comment, in the meantime here is the typo: Where it says 1. Run the following command: `sftp://invalid/test:0` It should say instead 1. Run the following command: `kate sftp://invalid/test:0` Apologize again for the mistake We parse that as line number. A question is if we really should do that for non-local files... Oh, thanks for the review. That would explain it, but, is that a documented feature? I can't see anything on the web documentation (https://docs.kde.org/stable5/en/kate/kate/fundamentals.html#starting-from-the-command-line) nor on the command line help (with kate -h) where the official parameters are apparently "-l, --line <line> Navigate to this line." and "-c, --column <column> Navigate to this column." I also tested with a local file, and it works if the file does exist, but will remove the prefix if not. So: $ kate './test:0' will open a file called test:0 if it exists. But if the file does not exists, it will open an empty new file called test. With sftp it will always remove the prefix, no matter if the file exists or not. I think this also happens with http urls, but I couldn't perform proper tests with that. That is not documented explicitly. And yes, for local files existence tests are done. A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1683 Git commit d8efd6c1ce34e14aed4b28d6f848fca65259fe3e by Christoph Cullmann. Committed on 30/12/2024 at 17:54. Pushed by cullmann into branch 'master'. don't cut :x:y cursor info from remote urls we do no check if the full url is existing M +5 -2 apps/lib/autotests/urlinfo_test.cpp M +17 -11 apps/lib/urlinfo.h https://invent.kde.org/utilities/kate/-/commit/d8efd6c1ce34e14aed4b28d6f848fca65259fe3e Thank you for the review and the fix! Much appreciated 😊 Thanks for reporting this, guess we didn't think about that case in the past properly. |