Roxen.git / server / modules / filesystems / filesystem.pike

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:387:       if(stat_cache && !id->pragma["no-cache"] &&    (fs = cache_lookup("stat_cache", norm_f)))    return fs[0];    object privs;    SETUID_NT("Statting file");       /* No security currently in this function */    fs = file_stat(norm_f);    privs = 0; +  if (fs && !(fs->ino)) { +  /* NB: NT does not have a way to get a valid ino field before +  * Windows Server 2012. Substitute with a hash of the +  * normalized path. +  * +  * NB: Use %+4c to avoid bignums (which are not supported by +  * the ino field). +  */ +  sscanf(Crypto.SHA256.hash(string_to_utf8(lower_case(f))), "%+4c", fs->ino); +  }    if(!stat_cache) return fs;    cache_set("stat_cache", norm_f, ({fs}));    return fs;   }      //! Normalize DAVLock path identifier.   string resource_id(string path, RequestID|int(0..0) id)   {    if ((< "Darwin", "Win32" >)[uname()->sysname]) {    return ::resource_id(lower_case(path), id);