Skip to content

On Windows, mktemp("") creates the temporary file at \ #48470

@yha

Description

@yha

On Windows:

julia> mktemp("") do path, io
           println(path)
       end
\jl_960E.tmp

The temp file is created at the root of whichever drive pwd() is in.

On linux, the file is created at pwd():

julia> mktemp("") do path, io
           println(path)
       end
jl_QVmxPb

I think this is the right behavior, and mktemp on Windows should do the same, since

julia> normpath("")
"."

julia> isabspath("")
false

julia> dirname("localfile")
""  # Not "."

Tested on 1.8.5 & 1.9.0-beta3 on Windows, 1.8.5 & master on linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    filesystemUnderlying file system and functions that use itsystem:windowsAffects only Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions