Skip to content

client crash on copying non empty directory #105

@evgmik

Description

@evgmik

Steps to reproduce: start fresh and do

$ ali touch /test/dir1/t1
$ ali touch /test/dir1/t2
$ ali touch /test/dir1/t3
$ ali cp /test/dir1 /test/copydir1
08.03.2021/23:47:49 ⚡ cmd/parser.go:598:  panic rollback: runtime error: slice bounds out of range [14:13]; stack: goroutine 219 [running]:
runtime/debug.Stack(0xc0001767b0, 0xc0003f0140, 0xc000a780a0)
        /usr/lib/go-1.14/src/runtime/debug/stack.go:24 +0x9d

I just show first line of the crash report. Depending on what inside of the parent dir (I think it subdirs), the repo database could be left in a broken state.

While we at it, it would be nice to be able to copy to non-existing path. For example, in above to do ali cp /test/dir1 /to/new/non/existing/dir

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAnything that derives from the defined functionalitymajorMajor issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions