mirror of
https://github.com/rclone/rclone.git
synced 2024-11-24 17:34:57 +01:00
711478554e
Starting with go1.22 the standard os.MkdirAll has improved its handling of volume names, and as part of that it now stops recursing into parent directory if it is a volume name (see:cd589c8a73
). This is similar to what was our main change and reason for creating a custom version. When building with go1.22 or newer we can therefore stop using our custom version, with the advantage that we automatically get current and future relevant improvements from golang. To support building with go1.21 the existing custom version is still kept, and therefore also our wrapper function file.MkdirAll - but it now just calls os.MkdirAll with go1.22 or newer on Windows. See #5401, #6420 andacf1e2df84
for details about the creation of our custom version of MkdirAll.
11 lines
231 B
Go
11 lines
231 B
Go
//go:build !windows || go1.22
|
|
|
|
package file
|
|
|
|
import "os"
|
|
|
|
// MkdirAll just calls os.MkdirAll on non-Windows and with go1.22 or newer on Windows
|
|
func MkdirAll(path string, perm os.FileMode) error {
|
|
return os.MkdirAll(path, perm)
|
|
}
|