Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace multiple contiguous forward-slash characters with a single one #1396

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function split_extension(path::String)
end
end

split_path(path::String) = split(path, os_separator_match)
split_path(path::String) = split(abs_path(path), os_separator_match)

function fileparts(filename::String)
pathname, filestr = dirname_basename(filename)
Expand All @@ -68,14 +68,14 @@ function fileparts(filename::String)
end

function file_path(components...)
join(components, os_separator)
abs_path(join(components, os_separator))
end

function fullfile(pathname::String, basename::String, ext::String)
if isempty(pathname)
return basename * ext
return abs_path(basename * ext)
else
return pathname * os_separator * basename * ext
return abs_path(pathname * os_separator * basename * ext)
end
end

Expand Down