1 | cprefix_folder := os.join_path(cm.basepath, prefix) |
2 | cpath = os.join_path(cprefix_folder, khash) |
3 | if !os.is_dir(cprefix_folder) { |
4 | - os.mkdir_all(cprefix_folder) or { panic(err) } |
5 | + os.mkdir_all(cprefix_folder) or { |
6 | + // The error here may be due to a race with another independent V process, that has already created the same folder. |
7 | + // If that is the case, so be it - just reuse the folder ¯\_(ツ)_/¯ ... |
8 | + if !os.is_dir(cprefix_folder) { |
9 | + panic(err) |
10 | + } |
11 | + } |
12 | } |
13 | dlog(@FN, 'new hk') |
14 | dlog(@FN, ' key: ${key}') |
15 | |