borschik icon indicating copy to clipboard operation
borschik copied to clipboard

Catch EEXIST errors on create directories

Open veged opened this issue 12 years ago • 1 comments

There is a code in lib/freeze.js:"

if (!FS.existsSync(_path)) {
    FS.mkdirSync(_path);
}

it's does't work properly because it's possible to catch state when FS.existsSync passed, but before FS.mkdirSync directory was created (especially when we run multiply threads with Borschik)

so I suggest add try/catch wrapper around FS.mkdirSync and ignore EEXIST exeption

veged avatar May 27 '13 11:05 veged

Fixed in https://github.com/bem/borschik/commit/3734c69b1cfc562309dfd1dec731b383338d54f1

doochik avatar Jun 16 '13 07:06 doochik