Skip to content

Commit

Permalink
closes #1001
Browse files Browse the repository at this point in the history
  • Loading branch information
tlienart committed Mar 22, 2023
1 parent 45eaadf commit 5e56b50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Franklin"
uuid = "713c75ef-9fc9-4b05-94a9-213340da978e"
authors = ["Thibaut Lienart <[email protected]>"]
version = "0.10.79"
version = "0.10.80"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 2 additions & 0 deletions src/eval/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function unixify(rpath::AS)::AS
isempty(rpath) && return "/"
# if windows, replace "\\" by "/"
Sys.isunix() || (rpath = replace(rpath, "\\" => "/"))
# if it's a path to a dot file, like path/.gitignore, return (issue #1001)
startswith(splitdir(rpath)[2], ".") && return rpath
# if it has an extension e.g.: /blah.txt, return
isempty(splitext(rpath)[2]) || return rpath
# if it doesn't have an extension, check if it ends with `/` e.g. : /blah/
Expand Down
1 change: 0 additions & 1 deletion src/manager/dir_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ function scan_input_dir!(args...; kw...)
# ignore "/"
d2i = filter!(d -> length(d) > 1, to_ignore[dir_indicator])
f2i = to_ignore[.!dir_indicator]

return _scan_input_dir!(args...; files2ignore=f2i, dirs2ignore=d2i, kw...)
end

Expand Down
2 changes: 2 additions & 0 deletions test/eval/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fs()
@test F.unixify("blah.txt") == "blah.txt"
@test F.unixify("blah/") == "blah/"
@test F.unixify("foo/bar") == "foo/bar/"
@test F.unixify("foo/.gitignore") == "foo/.gitignore"
@test F.unixify(".gitignore") == ".gitignore"
end

@testset "join_rpath" begin
Expand Down

0 comments on commit 5e56b50

Please sign in to comment.