-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix issue #9187 Handle wallabag server url with trailing slash(es) #10715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This code is 100% untested with KoReader ;-) It's been tested in isolation in a lua interpreter on my desktop though.
|
Maybe simpler |
I meant a bug with the server configuration really. |
plugins/wallabag.koplugin/main.lua
Outdated
-- Remove any trailing slashes to avoid failures | ||
while self.server_url:sub(-1) == "/" do | ||
self.server_url = self.server_url:sub(1, -2); | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @hius07 wrote you'd want to collapse and remove any number of / if you did this, but I'd rather do so on entry, so if this causes any issues it's relatively easy to diagnose ("the program keeps removing my slashes!") rather than completely hidden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So over here:
koreader/plugins/wallabag.koplugin/main.lua
Line 1061 in 2df4d45
self.server_url = myfields[1] |
@Frenzie anything else I need to do on this one? |
Yup, hope that it doesn't lead to trouble. ;-) |
This change is