From f2008d5f9ef6f4939a2339eac8382113193b0409 Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Wed, 3 Jun 2020 15:53:47 -0700 Subject: [PATCH] Fix mkpath error handling (#36126) The error thrown by `mkdir` when the directory already exists was changed in #33422. --- base/file.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/file.jl b/base/file.jl index e0030522ffa43f..1e860f30dc12fe 100644 --- a/base/file.jl +++ b/base/file.jl @@ -228,7 +228,7 @@ function mkpath(path::AbstractString; mode::Integer = 0o777) catch err # If there is a problem with making the directory, but the directory # does in fact exist, then ignore the error. Else re-throw it. - if !isa(err, SystemError) || !isdir(path) + if !isa(err, IOError) || !isdir(path) rethrow() end end