summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 08:49:13 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-25 08:49:13 +0200
commite544bc24b2552d826ee3d732dee59ea90e9b7e5f (patch)
treea0b4d4184feadaac5816263542b17e8aec39f2b3 /src
parente8c65a9cc9aee8f49df01e0452516adb1eb7f289 (diff)
App: Cleanup
Diffstat (limited to 'src')
-rw-r--r--src/app.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index d477abb5..fd6cd0bb 100644
--- a/src/app.c
+++ b/src/app.c
@@ -756,7 +756,8 @@ const iString *downloadPathForUrl_App(const iString *url, const iString *mime) {
756 } 756 }
757 } 757 }
758 else { 758 else {
759 iRangecc fn = { parts.path.start + lastIndexOfCStr_Rangecc(parts.path, "/") + 1, 759 const size_t slashPos = lastIndexOfCStr_Rangecc(parts.path, "/");
760 iRangecc fn = { parts.path.start + (slashPos != iInvalidPos ? slashPos + 1 : 0),
760 parts.path.end }; 761 parts.path.end };
761 if (!isEmpty_Range(&fn)) { 762 if (!isEmpty_Range(&fn)) {
762 setRange_String(name, fn); 763 setRange_String(name, fn);