Fossil SCM

Restored a call to "mimetype_from_name()" in local-diff mode.

graham 2021-02-15 15:35 ui-local-diff
Commit e494b979545c52bac782c6493d10fb47285f790a41300d74074a73fe59a3e401
1 file changed +2
+2
--- src/info.c
+++ src/info.c
@@ -3324,10 +3324,12 @@
33243324
if( !bLocalMode ){
33253325
style_submenu_element("Download", "%R/raw/%s?at=%T", zUuid, file_tail(zName));
33263326
if( db_exists("SELECT 1 FROM mlink WHERE fid=%d", rid) ){
33273327
style_submenu_element("Check-ins Using", "%R/timeline?uf=%s", zUuid);
33283328
}
3329
+ } else {
3330
+ zMime = mimetype_from_name(blob_str(&downloadName));
33293331
}
33303332
if( zMime ){
33313333
if( fossil_strcmp(zMime, "text/html")==0 ){
33323334
if( asText ){
33333335
style_submenu_element("Html", "%s", url_render(&url, "txt", 0, 0, 0));
33343336
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button