Skip to content

Commit

Permalink
Use underscores and remove extension
Browse files Browse the repository at this point in the history
  • Loading branch information
musm authored Dec 5, 2019
1 parent 721ff1d commit 9185451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,14 @@ function _uiud_string()

ccall((:RpcStringFreeW, :Rpcrt4), stdcall, Cint, (Ref{Ptr{Cwchar_t}},), nameptr)

name = filter(!=('-'), name)
name = replace(name, '-' => '_')
return name
end

function tempname(parent::AbstractString=tempdir(); cleanup::Bool=true)
isdir(parent) || throw(ArgumentError("$(repr(parent)) is not a directory"))
name = _uiud_string()
filename = joinpath(parent, temp_prefix * name * ".tmp")
filename = joinpath(parent, temp_prefix * name)
@assert !ispath(filename)
cleanup && temp_cleanup_later(filename)
return filename
Expand Down

0 comments on commit 9185451

Please sign in to comment.