Fossil SCM
Restored a call to "mimetype_from_name()" in local-diff mode.
Commit
e494b979545c52bac782c6493d10fb47285f790a41300d74074a73fe59a3e401
Parent
0516f4d3c85d8e3…
1 file changed
+2
+2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -3324,10 +3324,12 @@ | ||
| 3324 | 3324 | if( !bLocalMode ){ |
| 3325 | 3325 | style_submenu_element("Download", "%R/raw/%s?at=%T", zUuid, file_tail(zName)); |
| 3326 | 3326 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 3327 | 3327 | style_submenu_element("Check-ins Using", "%R/timeline?uf=%s", zUuid); |
| 3328 | 3328 | } |
| 3329 | + } else { | |
| 3330 | + zMime = mimetype_from_name(blob_str(&downloadName)); | |
| 3329 | 3331 | } |
| 3330 | 3332 | if( zMime ){ |
| 3331 | 3333 | if( fossil_strcmp(zMime, "text/html")==0 ){ |
| 3332 | 3334 | if( asText ){ |
| 3333 | 3335 | style_submenu_element("Html", "%s", url_render(&url, "txt", 0, 0, 0)); |
| 3334 | 3336 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -3324,10 +3324,12 @@ | |
| 3324 | if( !bLocalMode ){ |
| 3325 | style_submenu_element("Download", "%R/raw/%s?at=%T", zUuid, file_tail(zName)); |
| 3326 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 3327 | style_submenu_element("Check-ins Using", "%R/timeline?uf=%s", zUuid); |
| 3328 | } |
| 3329 | } |
| 3330 | if( zMime ){ |
| 3331 | if( fossil_strcmp(zMime, "text/html")==0 ){ |
| 3332 | if( asText ){ |
| 3333 | style_submenu_element("Html", "%s", url_render(&url, "txt", 0, 0, 0)); |
| 3334 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -3324,10 +3324,12 @@ | |
| 3324 | if( !bLocalMode ){ |
| 3325 | style_submenu_element("Download", "%R/raw/%s?at=%T", zUuid, file_tail(zName)); |
| 3326 | if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){ |
| 3327 | style_submenu_element("Check-ins Using", "%R/timeline?uf=%s", zUuid); |
| 3328 | } |
| 3329 | } else { |
| 3330 | zMime = mimetype_from_name(blob_str(&downloadName)); |
| 3331 | } |
| 3332 | if( zMime ){ |
| 3333 | if( fossil_strcmp(zMime, "text/html")==0 ){ |
| 3334 | if( asText ){ |
| 3335 | style_submenu_element("Html", "%s", url_render(&url, "txt", 0, 0, 0)); |
| 3336 |