]> git.tuebingen.mpg.de Git - adu.git/blobdiff - create.c
Add rudimentary interactive support.
[adu.git] / create.c
index 638ba19d28dc5fe3258ea71eabb48514fe9bbb56..47c715568d5e41e0f051eaf9530f920dcc167753 100644 (file)
--- a/create.c
+++ b/create.c
@@ -133,7 +133,7 @@ static int scan_dir(char *dirname, uint64_t *parent_dir_num)
        }
        while ((entry = readdir(dir))) {
                mode_t m;
-               struct stat s;
+               struct stat64 s;
                uint32_t uid;
                uint64_t size;
                struct user_info *ui;
@@ -142,9 +142,9 @@ static int scan_dir(char *dirname, uint64_t *parent_dir_num)
                        continue;
                if (!strcmp(entry->d_name, ".."))
                        continue;
-               if (lstat(entry->d_name, &s) == -1) {
-                       WARNING_LOG("lstat error for %s/%s\n", dirname,
-                               entry->d_name);
+               if (lstat64(entry->d_name, &s) == -1) {
+                       WARNING_LOG("lstat64 error for %s/%s (%s)\n",
+                               dirname, entry->d_name, strerror(errno));
                        continue;
                }
                m = s.st_mode;