Skip to content

Commit

Permalink
Merge pull request #34 from tomaklutfu/tomaklutfu-patch-1
Browse files Browse the repository at this point in the history
Update `mkdir` when it needs to create more than one path
  • Loading branch information
disberd authored Nov 13, 2023
2 parents 13ce734 + 0ae6cd6 commit 3433295
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/local_plotly_library.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DATA_FOLDER = BaseDirs.User.data("plutoplotly/")
isdir(DATA_FOLDER) || mkdir(DATA_FOLDER)
isdir(DATA_FOLDER) || mkpath(DATA_FOLDER)
const VERSIONS_PATH = joinpath(DATA_FOLDER, "plotly_versions")
const VERSIONS_DICT = Ref(
try
Expand Down Expand Up @@ -27,7 +27,7 @@ function maybe_put_plotly_in_pluto(v)
isdir(dist_path) || (subdir === "frontend" ? error("Something went wrong") : continue)
file_path = joinpath(dist_path, "plotlyjs", "$name.min.js")
if !isfile(file_path)
isdir(joinpath(dist_path, "plotlyjs")) || mkdir(joinpath(dist_path, "plotlyjs"))
isdir(joinpath(dist_path, "plotlyjs")) || mkpath(joinpath(dist_path, "plotlyjs"))
cp(get_local_path(v), file_path)
end
end
Expand Down Expand Up @@ -86,4 +86,4 @@ function get_plotly_src(v, force = "local")
get_local_pluto_src(v)
end
end


0 comments on commit 3433295

Please sign in to comment.