make browse_path work on win32 -- implement d_type in readdir_r emulation.

This commit is contained in:
Ron Pedde 2006-05-09 05:51:08 +00:00
parent bcdc603b40
commit 36f35206dc

View File

@ -8,7 +8,9 @@
# include "config.h" # include "config.h"
#endif #endif
#include <dirent.h> #ifndef WIN32
#include <dirent.h> /* c'mon, config for this */
#endif
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>
@ -16,7 +18,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <unistd.h> #ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <sys/types.h> #include <sys/types.h>
@ -319,7 +323,6 @@ void xml_browse_path(WS_CONNINFO *pwsc) {
readable = !access(resolved_path,R_OK); readable = !access(resolved_path,R_OK);
writable = !access(resolved_path,W_OK); writable = !access(resolved_path,W_OK);
xml_push(pxml,"directory"); xml_push(pxml,"directory");
xml_output(pxml,"name",pde->d_name); xml_output(pxml,"name",pde->d_name);
xml_output(pxml,"full_path",resolved_path); xml_output(pxml,"full_path",resolved_path);