Skip to content

Better error message on mv(x, x) #55833

@LilithHafner

Description

@LilithHafner

The error message when moving a file to it's current location could be better:

julia> mv("file", "file")
ERROR: ArgumentError: 'file' exists. `force=true` is required to remove 'file' before moving.
Stacktrace:
 [1] checkfor_mv_cp_cptree(src::String, dst::String, txt::String; force::Bool)
   @ Base.Filesystem ./file.jl:334
 [2] checkfor_mv_cp_cptree
   @ ./file.jl:318 [inlined]
 [3] #mv#15
   @ ./file.jl:427 [inlined]
 [4] mv(src::String, dst::String)
   @ Base.Filesystem ./file.jl:426
 [5] top-level scope
   @ REPL[93]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesBetter, more actionable error messagesfilesystemUnderlying file system and functions that use it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions