error=File exists

Issue #5 resolved
János Csárdi-Braunstein created an issue

I see this message in syslog:

{{{ piler[10111]: 400000004f9aa2af106a9d247d585e532443: mkdir /var/piler/store/53: error=File exists }}}

I think this is not a realy bug, but why say this message in info verbosity level?

It's make difficult to debug, i think.

Comments (2)

  1. Janos SUTO repo owner

    You are right. The following diff will help:

    --- a/src/store.c
    +++ b/src/store.c
    @@ -130,9 +130,9 @@ int store_file(struct session_data *sdata, char *filename, int startpos, int len
           p2 = strrchr(s, '/'); if(!p2) goto ENDE;
           *p2 = '\0';
     
    -      rc = mkdir(s, 0750); if(rc == -1) syslog(LOG_PRIORITY, "%s: mkdir %s: error=%s", sdata->ttmpfile, s, strerror(errno));
    +      rc = mkdir(s, 0750);
           *p2 = '/';
    -      rc = mkdir(s, 0750); if(rc == -1) syslog(LOG_PRIORITY, "%s: mkdir %s: error=%s", sdata->ttmpfile, s, strerror(errno));
    +      rc = mkdir(s, 0750);
           *p1 = '/';
           rc = mkdir(s, 0770); if(rc == -1) syslog(LOG_PRIORITY, "%s: mkdir %s: error=%s", sdata->ttmpfile, s, strerror(errno));
        }
    
  2. Log in to comment