Skip to content

Commit

Permalink
Bugfix for badly-handled special characters in file paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
James.Hester committed Jan 18, 2024
1 parent df0a011 commit eef4276
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/ddlm_dictionary_ng.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1330,9 +1330,9 @@ Really belongs in FilePaths.jl but for now this will work.
"""
to_path(u::URI) = begin
if Sys.iswindows()
Path(u.path[2:end])
Path(unescapeuri(u.path[2:end]))
else
Path(u.path)
Path(unescapeuri(u.path))
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/dictionaries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ end
@test get_parent_category(ud,"structure") == "magnetic"
# try importing through alternative directory, we've changed update date.
uf = DDLm_Dictionary(joinpath(@__PATH__,"small_core_test.dic"),
import_dir=joinpath(@__PATH__,"other_import_dir"))
import_dir=joinpath(@__PATH__,"other import dir"))
@test String(uf["_diffrn_orient_matrix.UB_11"][:definition][!,:update][]) == "2021-12-07"
end

Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 7 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ prepare_block(filename,blockname;native=false) = begin
b = t[blockname]
end


include("creation.jl")
include("data_access.jl")
include("caseless_test.jl")
include("native_parser.jl")
include("save_frames.jl")
#include("creation.jl")
#include("data_access.jl")
#include("caseless_test.jl")
#include("native_parser.jl")
#include("save_frames.jl")
include("dictionaries.jl")
include("output.jl")
#include("output.jl")


# Test DataContainers

include("dc_base.jl")
#include("dc_base.jl")

0 comments on commit eef4276

Please sign in to comment.