Skip to content

Commit f2008d5

Browse files
simonbyrnesimeonschaub
authored andcommitted
Fix mkpath error handling (JuliaLang#36126)
The error thrown by `mkdir` when the directory already exists was changed in JuliaLang#33422.
1 parent 264e90e commit f2008d5

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)