diff --git a/base/file.jl b/base/file.jl index 64135e559e17bd..49af8508cdb8e3 100644 --- a/base/file.jl +++ b/base/file.jl @@ -206,7 +206,7 @@ julia> readdir("test") function mkpath(path::AbstractString; mode::Integer = 0o777) isdirpath(path) && (path = dirname(path)) dir = dirname(path) - (path == dir || isdir(path)) && return + (path == dir || isdir(path)) && return path mkpath(dir, mode = checkmode(mode)) try mkdir(path, mode = mode)