From b234251a4d6b05ea4e951553071702715b7e6747 Mon Sep 17 00:00:00 2001 From: tenox Date: Fri, 26 Aug 2016 00:29:44 -0700 Subject: shm_id now uses ftok() --- dir.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dir.c b/dir.c index e6242ef..a2af6e8 100644 --- a/dir.c +++ b/dir.c @@ -66,9 +66,13 @@ void dirlist(void) { char *name, *icon, *linecolor; int nentr=0, e=0, n=1; int editable; + int upload_id=0; time_t now; time(&now); + upload_id=ftok(getenv("SCRIPT_FILENAME"), getpid()); + if(upload_id<1) + upload_id=now; // holy shit cgiFormStringNoNewlines("highlight", highlight, VIRT_FILENAME_SIZE-1); cgiFormStringNoNewlines("sortby", sortby, 63); @@ -101,7 +105,6 @@ void dirlist(void) { "%s : %c%s\n", copyright, TAGLINE, (strlen(virt_dirname)>0) ? ' ' : '/', virt_dirname); - if(js) fprintf(cgiOut, "