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

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1165:    if (size > 0) {    QUOTA_WERR("Deallocating " + size + "bytes.");    id->misc->quota_obj->deallocate(URI, size);    }    }       object to = Stdio.File();       TRACE_ENTER("PUT: Accepted", 0);    +  if ((size > -1) && (< "Darwin", "Win32" >)[System.uname()->sysname]) { +  // File exists, and we're on an OS where we assume a +  // case insensitive filesystem. +  // +  // NB: At least MacOS X has the misbehavior of renaming +  // preexisting files when opening with "wct". +  // +  // Avoid this by looking up the name from the filesystem. +  TRACE_ENTER(sprintf("Looking up path %O in real filesystem.", norm_f), 0); +  norm_f = Roxen.lookup_real_path_case_insens(norm_f, 1); +  TRACE_LEAVE(sprintf("FOund path: %O\n", norm_f)); +  } +     /* Clear the stat-cache for this file */    if (stat_cache) {    cache_set("stat_cache", norm_f, 0);    }       if(!to->open(norm_f, "wct", 0666))    {    int err = to->errno();    privs = 0;    TRACE_LEAVE("PUT: Open failed");