cadius
cadius copied to clipboard
Bogus directories created if absolute path passed
Repro:
-
mkdir /tmp/foo -
cadius EXTRACTFILE example.2mg "/VOL/FILE" /tmp/foo
Expected:
- File is extracted to
/tmp/foo
Actual:
- File is extracted to
/tmp/foobut empty directoriestmpandtmp/fooare 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.