git: sbin/hammer2/cmd_recover.c: Fail fast if destdir is not a directory

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Wed Apr 9 03:17:23 PDT 2025


commit ffc74c0c40bd320bf808c75e2ce08cc63f528be8
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Wed Apr 9 02:25:08 2025 -0700

    sbin/hammer2/cmd_recover.c: Fail fast if destdir is not a directory
    
    If <destdir> is not a directory, syscalls in dump_tree() in restoration
    pass are not going to succeed. Then just immediately fail before
    blockref scan even starts (or mkdir(2) -p the <destdir>).

Summary of changes:
 sbin/hammer2/cmd_recover.c | 9 +++++++++
 sbin/hammer2/main.c        | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ffc74c0c40bd320bf808c75e2ce08cc63f528be8


-- 
DragonFly BSD source repository


More information about the Commits mailing list