X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Funix_capture.c;h=74f83d2b59a9dba6c13e1d5c794f70c6a33dc907;hp=4f526f7dda1029815a5cfd553458b83b38dc7696;hb=1f50611288c0549ef7408a4fd6642f55efc4cd99;hpb=143db75c035e6ecaca451ce70a4ed58a01102b43 diff --git a/src/unix_capture.c b/src/unix_capture.c index 4f526f7d..74f83d2b 100644 --- a/src/unix_capture.c +++ b/src/unix_capture.c @@ -1,5 +1,9 @@ /* - * Copyright (C) 2013 Eric Biggers + * unix_capture.c: Capture a directory tree on UNIX. + */ + +/* + * Copyright (C) 2012, 2013 Eric Biggers * * This file is part of wimlib, a library for working with WIM files. * @@ -82,7 +86,7 @@ unix_capture_directory(struct wim_dentry *dir_dentry, if (!dir) { ERROR_WITH_ERRNO("Failed to open the directory `%s'", path); - return WIMLIB_ERR_OPEN; + return WIMLIB_ERR_OPENDIR; } /* Recurse on directory contents */ @@ -225,8 +229,9 @@ unix_build_dentry_tree_recursive(struct wim_dentry **root_ret, stat_fn = lstat; ret = (*stat_fn)(path, &stbuf); - if (ret != 0) { + if (ret) { ERROR_WITH_ERRNO("Failed to stat `%s'", path); + ret = WIMLIB_ERR_STAT; goto out; } if (!S_ISREG(stbuf.st_mode) && !S_ISDIR(stbuf.st_mode)