Amir Alawi 4cbf74bd9b
fix std.fs.Dir.makePath silent failure (#16878)
std.fs.dir.makePath silently failed if one of the items in the path already exists. For example:

cwd.makePath("foo/bar/baz")
Silently failing is OK if "bar" is already a directory - this is the intended use of makePath (like mkdir -p). But if bar is a file then the subdirectory baz cannot be created - the end result is that makePath doesn't do anything which should be a detectable error because baz is never created.

The existing code had a TODO comment that did not specifically cover this error, but the solution for this silent failure also accomplishes the TODO task - the code now stats "foo" and returns an appropriate error. The new code also handles potential race condition if "bar" is deleted/permissions changed/etc in between the initial makeDir and statFile calls.
2024-01-08 15:58:14 -05:00
..
2023-11-25 12:28:19 +02:00
2023-11-22 19:08:55 -07:00
2023-11-22 13:24:27 -05:00
2023-12-19 12:01:09 -07:00
2024-01-03 12:34:10 +02:00
2023-11-26 14:28:22 -05:00
2023-11-22 13:24:27 -05:00
2023-11-22 19:08:55 -07:00
2023-11-25 12:28:19 +02:00
2023-10-23 22:42:18 -04:00
2023-11-09 17:41:14 +01:00
2023-11-22 15:24:57 -07:00
2023-10-25 04:28:30 -04:00
2024-01-04 17:54:56 +02:00
2024-01-07 16:27:50 +01:00
2023-11-03 23:18:21 -04:00
2023-12-11 17:48:18 +02:00
2023-11-19 09:55:07 +00:00
2023-11-22 13:24:27 -05:00
2023-10-27 03:33:49 -04:00
2024-01-01 17:51:18 -07:00
2023-12-20 20:05:16 -08:00
2024-01-01 17:51:18 -07:00
2023-10-21 21:24:55 +00:00
2023-10-21 21:24:55 +00:00