From 5da6be2e5a8acd053018e6fcf94e5c18def683c7 Mon Sep 17 00:00:00 2001 From: Josh Langsfeld Date: Wed, 10 Feb 2016 18:27:41 -0500 Subject: [PATCH] Fix readall and isexecutable deprecations --- REQUIRE | 2 +- src/mxbase.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/REQUIRE b/REQUIRE index df77a41..f32a000 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,2 +1,2 @@ julia 0.3 -Compat +Compat 0.7.9 diff --git a/src/mxbase.jl b/src/mxbase.jl index 81904ac..b7da587 100644 --- a/src/mxbase.jl +++ b/src/mxbase.jl @@ -12,7 +12,7 @@ function get_paths() if matlab_homepath == "" if OS_NAME == :Linux - matlab_homepath = dirname(dirname(realpath(chomp(readall(`which matlab`))))) + matlab_homepath = dirname(dirname(realpath(chomp(readstring(`which matlab`))))) elseif OS_NAME == :Darwin apps = readdir("/Applications") filter!(app -> ismatch(r"^MATLAB_R[0-9]+[ab]\.app$", app), apps) @@ -37,7 +37,7 @@ function get_paths() if OS_NAME != :Windows default_startcmd = joinpath(matlab_homepath, "bin", "matlab") - if !isexecutable(default_startcmd) + if !isfile(default_startcmd) error("The MATLAB path is invalid. Set the MATLAB_HOME evironmental variable to the MATLAB root.") end default_startcmd = "exec $(Base.shell_escape(default_startcmd)) -nosplash"