cadius icon indicating copy to clipboard operation
cadius copied to clipboard

Bogus directories created if absolute path passed

Open inexorabletash opened this issue 3 years ago • 0 comments

Repro:

  1. mkdir /tmp/foo
  2. cadius EXTRACTFILE example.2mg "/VOL/FILE" /tmp/foo

Expected:

  • File is extracted to /tmp/foo

Actual:

  • File is extracted to /tmp/foo but empty directories tmp and tmp/foo are created in the current directory.

Root cause:

  • In Src/os/os.c, os_CreateDirectory() is called with "/tmp/foo". It then tokenizes it into "tmp" and "foo" and recursively creates those directories inside the current working directory.

inexorabletash avatar Aug 31 '22 03:08 inexorabletash