diff --git a/src/MadsIO.jl b/src/MadsIO.jl index f639aa18..b50389bc 100644 --- a/src/MadsIO.jl +++ b/src/MadsIO.jl @@ -1895,7 +1895,9 @@ function fixlinks(dir::AbstractString="."; test::Bool=true, verbose::Bool=false) if islink(f) verbose && println("Checking Link: $(f)") link = readlink(f) - if !isfile(link) + if length(link) < 256 && isascii(link) && isfile(link) + printstyled("Link of `$(f)` to `$(link)` is OK\n"; color=:green) + else printstyled("Link `$(f)` needs to be fixed: `$(link)` does not exist!\n"; color=:red) link_win = Sys.iswindows() ? replace(fn, "/"=>"\\") : link if isfile(link_win) @@ -1907,8 +1909,6 @@ function fixlinks(dir::AbstractString="."; test::Bool=true, verbose::Bool=false) printstyled("Link needs to be fixed: `$(link_win)` to `$(fn)`\n"; color=:yellow) end end - else - printstyled("Link of `$(f)` to `$(link)` is OK\n"; color=:green) end elseif isfile(f) verbose && println("Checking File: $(f)")