Skip to content

Commit

Permalink
testing the read-only permission of Pkg.add
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijscox-asml committed Aug 18, 2023
1 parent e4d3f90 commit d4f9257
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function update_table_style!(unzipped_ppt_dir::String=".")
end
end

function add_contenttypes!()
path = joinpath("..", "[Content_Types].xml")
function add_contenttypes!(unzipped_ppt_dir::String=".")
path = abspath(joinpath(unzipped_ppt_dir, "..", "[Content_Types].xml"))
doc = readxml(path)
r = root(doc)
extension_contenttypes = (
Expand Down
6 changes: 5 additions & 1 deletion test/testWriting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ end
media_dir = joinpath(edited_template_path, "ppt", "media")
mkdir(media_dir)

# extra complexity: support read-only template support
# see https://github.com/ASML-Labs/PPTX.jl/issues/45
chmod(edited_template_path, 0o444; recursive=true)

pres = Presentation(;title="My Presentation")
s1 = Slide()
julia_logo = Picture(joinpath(PPTX.ASSETS_DIR,"julia_logo.png"), top = 110, left = 110)
Expand All @@ -124,4 +128,4 @@ end

@test isfile(pptx_path)
end
end
end

0 comments on commit d4f9257

Please sign in to comment.