Show
Ignore:
Timestamp:
11/16/11 00:49:59 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1321404599 -0500
git-parent:

[a23f396910835ccd3d57d8f12cb36126660012e2]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1321404599 -0500
Message:

this could fail if another thread was mucking with the directory structure (like using this concurrently)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_mkdir.c

    r5c424a9 rd3ed2ae  
    5353  *eos = '\0'; 
    5454  rv = mkdir(path, m); 
    55   if(rv == 0) return 0; 
     55  if(rv == 0 || errno == EEXIST) return 0; 
    5656  if(errno == ENOENT) if(mkdir_for_file(path, m) != 0) return -1; 
    5757  rv = mkdir(path, m); 
     58  if(rv < 0 && errno == EEXIST) rv = 0; 
    5859  return rv; 
    5960}