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 committed Jan 16, 2020
1 parent c20c806 commit cc43229
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 @@ -545,14 +545,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 cc43229

Please sign in to comment.