mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
2aa13f86f0
Standard golang's `os.MkdirAll()` function returns "not a directory" error in case a directory to be created already exists but is not a directory (e.g. a file). Our own `idtools.MkdirAs*()` functions do not replicate the behavior. This is a bug since all `Mkdir()`-like functions are expected to ensure the required directory exists and is indeed a directory, and return an error otherwise. As the code is using our in-house `system.Stat()` call returning a type which is incompatible with that of golang's `os.Stat()`, I had to amend the `system` package with `IsDir()`. A test case is also provided. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> |
||
---|---|---|
.. | ||
chtimes.go | ||
chtimes_test.go | ||
chtimes_unix.go | ||
chtimes_unix_test.go | ||
chtimes_windows.go | ||
chtimes_windows_test.go | ||
errors.go | ||
exitcode.go | ||
filesys.go | ||
filesys_windows.go | ||
init.go | ||
init_unix.go | ||
init_windows.go | ||
lcow.go | ||
lcow_unix.go | ||
lcow_windows.go | ||
lstat_unix.go | ||
lstat_unix_test.go | ||
lstat_windows.go | ||
meminfo.go | ||
meminfo_linux.go | ||
meminfo_unix_test.go | ||
meminfo_unsupported.go | ||
meminfo_windows.go | ||
mknod.go | ||
mknod_windows.go | ||
path.go | ||
path_windows_test.go | ||
process_unix.go | ||
process_windows.go | ||
rm.go | ||
rm_test.go | ||
stat_darwin.go | ||
stat_freebsd.go | ||
stat_linux.go | ||
stat_openbsd.go | ||
stat_solaris.go | ||
stat_unix.go | ||
stat_unix_test.go | ||
stat_windows.go | ||
syscall_unix.go | ||
syscall_windows.go | ||
syscall_windows_test.go | ||
umask.go | ||
umask_windows.go | ||
utimes_freebsd.go | ||
utimes_linux.go | ||
utimes_unix_test.go | ||
utimes_unsupported.go | ||
xattrs_linux.go | ||
xattrs_unsupported.go |