Commit 81bd8ef7 authored by Max Kellermann's avatar Max Kellermann

update_walk: don't check recursive symlinks on WIN32

inode numbers don't work on WIN32, and very few WIN32 users actually use symlinks - seems ok to disable that check.
parent bedc172e
...@@ -292,6 +292,7 @@ stat_directory_child(const struct directory *parent, const char *name, ...@@ -292,6 +292,7 @@ stat_directory_child(const struct directory *parent, const char *name,
return ret; return ret;
} }
#ifndef G_OS_WIN32
static int static int
statDirectory(struct directory *dir) statDirectory(struct directory *dir)
{ {
...@@ -304,10 +305,12 @@ statDirectory(struct directory *dir) ...@@ -304,10 +305,12 @@ statDirectory(struct directory *dir)
return 0; return 0;
} }
#endif
static int static int
inodeFoundInParent(struct directory *parent, ino_t inode, dev_t device) inodeFoundInParent(struct directory *parent, ino_t inode, dev_t device)
{ {
#ifndef G_OS_WIN32
while (parent) { while (parent) {
if (!parent->stat && statDirectory(parent) < 0) if (!parent->stat && statDirectory(parent) < 0)
return -1; return -1;
...@@ -317,6 +320,11 @@ inodeFoundInParent(struct directory *parent, ino_t inode, dev_t device) ...@@ -317,6 +320,11 @@ inodeFoundInParent(struct directory *parent, ino_t inode, dev_t device)
} }
parent = parent->parent; parent = parent->parent;
} }
#else
(void)parent;
(void)inode;
(void)device;
#endif
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment