X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/1221adbb581e222cfe932fe72fded2d8613112d9..e5ca46bf4b974ce3b51d09da4c7ad741aaa70ede:/ui-snapshot.c?ds=inline diff --git a/ui-snapshot.c b/ui-snapshot.c index bd34a28..dfedd8f 100644 --- a/ui-snapshot.c +++ b/ui-snapshot.c @@ -99,6 +99,7 @@ void cgit_print_snapshot(struct cacheitem *item, const char *head, memset(&args,0,sizeof(args)); args.base = fmt("%s/", prefix); args.tree = commit->tree; + args.time = commit->date; cgit_print_snapshot_start(sat->mimetype, filename, item); (*sat->write_func)(&args); return; @@ -129,7 +130,7 @@ int cgit_parse_snapshots_mask(const char *str) { const struct snapshot_archive_t* sat; static const char *delim = " \t,:/|;"; - int f, tl, rv = 0; + int f, tl, sl, rv = 0; /* favor legacy setting */ if(atoi(str)) @@ -141,8 +142,9 @@ int cgit_parse_snapshots_mask(const char *str) break; for(f=0; fsuffix, str, tl) && - strncmp(sat->suffix+1, str, tl-1))) { + sl = strlen(sat->suffix); + if((tl == sl && !strncmp(sat->suffix, str, tl)) || + (tl == sl-1 && !strncmp(sat->suffix+1, str, tl-1))) { rv |= sat->bit; break; }