X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Funix_capture.c;h=906920a86144dc9549b58975e694691d6c8563ee;hp=963e53dabfb388c1e33dc1a0383348ea972e8ab7;hb=56ba8c06fa16282e9d89e0c8c88ec1d69c20d4d3;hpb=36fae332ff07defaf465c363c56bc0274550b86c diff --git a/src/unix_capture.c b/src/unix_capture.c index 963e53da..906920a8 100644 --- a/src/unix_capture.c +++ b/src/unix_capture.c @@ -23,10 +23,9 @@ #ifndef __WIN32__ -#include "wimlib_internal.h" -#include "dentry.h" -#include "lookup_table.h" -#include "timestamp.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include #include @@ -34,6 +33,14 @@ #include #include +#include "wimlib/capture.h" +#include "wimlib/dentry.h" +#include "wimlib/error.h" +#include "wimlib/lookup_table.h" +#include "wimlib/paths.h" +#include "wimlib/reparse.h" +#include "wimlib/timestamp.h" + static int unix_capture_regular_file(const char *path, u64 size, @@ -138,12 +145,9 @@ unix_capture_symlink(struct wim_dentry **root_p, inode->i_attributes = FILE_ATTRIBUTE_REPARSE_POINT; inode->i_reparse_tag = WIM_IO_REPARSE_TAG_SYMLINK; - /* The idea here is to call readlink() to get the UNIX target of - * the symbolic link, then turn the target into a reparse point - * data buffer that contains a relative or absolute symbolic - * link (NOT a junction point or *full* path symbolic link with - * drive letter). - */ + /* The idea here is to call readlink() to get the UNIX target of the + * symbolic link, then turn the target into a reparse point data buffer + * that contains a relative or absolute symbolic link. */ deref_name_len = readlink(path, deref_name_buf, sizeof(deref_name_buf) - 1); if (deref_name_len >= 0) { @@ -243,7 +247,7 @@ unix_build_dentry_tree_recursive(struct wim_dentry **root_ret, goto out; } - ret = inode_table_new_dentry(params->inode_table, + ret = inode_table_new_dentry(¶ms->inode_table, path_basename_with_len(path, path_len), stbuf.st_ino, stbuf.st_dev, false, &root); if (ret)