Files
test/source/blender/blenlib
Sybren A. Stüvel 7f4096be41 Core: treat already-existing directory as 'ok' in recursive mkdir
When creating a directory recursively (via
`BLI_file_ensure_parent_dir_exists()` or `BLI_dir_create_recursive()`,
filter out errors that indicate that the directory already exists.
This is now also covered by a unit test.

I've also removed `BLI_assert(BLI_exists(dirname) == 0);` from
`dir_create_recursive()` (the workhorse for the above-mentioned
functions), for two reasons:

- The function is only used in an "ensure this directory exist"
  context, so the directory existing should be fine, and
- the assertion doesn't guarantee that the subsequent call to
  `mkdir()` actually succeeds. Race conditions between Blender and
  other processes (potentially on other computers, when using
  networked filesystems) will make such a precondition test
  unreliable.

This is a followup of 00abaa571a.

Pull Request: https://projects.blender.org/blender/blender/pulls/145173
2025-08-26 18:30:46 +02:00
..
2025-07-30 14:22:06 +10:00
2025-07-30 14:22:06 +10:00