mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-24 13:13:17 -05:00
win32 cleanups
This commit is contained in:
parent
d5b29cd4ef
commit
55793d6c32
@ -122,7 +122,6 @@ char *os_realpath(const char *pathname, char *resolved_path) {
|
||||
char *ptr;
|
||||
WCHAR utf16_rel_path[PATH_MAX+1];
|
||||
WCHAR utf16_path[PATH_MAX+1];
|
||||
int utf16_len;
|
||||
|
||||
/* need to take the utf-8 and convert to utf-16, then _fullpath, then back */
|
||||
util_utf8toutf16((unsigned char *)&utf16_rel_path,PATH_MAX * sizeof(WCHAR),(char*)pathname,(int)strlen(pathname));
|
||||
|
@ -38,6 +38,7 @@
|
||||
#define PATH_MAX 512 /* it's clearly not _MAX_PATH... other projects seem to use 512 */
|
||||
#define MAX_NAME_LEN _MAX_PATH
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
#define S_IFLNK 0x1
|
||||
|
||||
#define HOST "unknown-windows-ick"
|
||||
#define SERVICENAME "Firefly Media Server"
|
||||
@ -56,6 +57,7 @@ typedef INT16 int16_t;
|
||||
typedef UINT32 uint32_t;
|
||||
typedef INT32 int32_t;
|
||||
|
||||
|
||||
/* Funtion fixups */
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
|
@ -470,7 +470,7 @@ void xml_browse_path(WS_CONNINFO *pwsc) {
|
||||
readable = !access(resolved_path,R_OK);
|
||||
writable = !access(resolved_path,W_OK);
|
||||
|
||||
if(pde->d_type & DT_DIR) {
|
||||
if(sb.st_mode & S_IFDIR) {
|
||||
xml_push(pxml,"directory");
|
||||
} else if((sb.st_mode & S_IFLNK) == S_IFLNK) {
|
||||
xml_push(pxml,"symlink");
|
||||
|
Loading…
x
Reference in New Issue
Block a user