Skip to content

Commit 912a8ed

Browse files
authored
Fix mkpath error handling (#36126)
The error thrown by `mkdir` when the directory already exists was changed in #33422.
1 parent c69fab5 commit 912a8ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/file.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function mkpath(path::AbstractString; mode::Integer = 0o777)
228228
catch err
229229
# If there is a problem with making the directory, but the directory
230230
# does in fact exist, then ignore the error. Else re-throw it.
231-
if !isa(err, SystemError) || !isdir(path)
231+
if !isa(err, IOError) || !isdir(path)
232232
rethrow()
233233
end
234234
end

0 commit comments

Comments
 (0)