dav/system.c

changeset 747
efbd59642577
parent 612
66dc8b992d8d
child 789
378b5ab86f77
equal deleted inserted replaced
746:a569148841ff 747:efbd59642577
34 #include <dirent.h> 34 #include <dirent.h>
35 #include <sys/stat.h> 35 #include <sys/stat.h>
36 #include <sys/types.h> 36 #include <sys/types.h>
37 #include <errno.h> 37 #include <errno.h>
38 38
39 #include <ucx/string.h> 39 #include <cx/string.h>
40 40
41 #ifndef _WIN32 41 #ifndef _WIN32
42 #include <unistd.h> 42 #include <unistd.h>
43 #endif 43 #endif
44 44
333 int sys_islink(const char *path) { 333 int sys_islink(const char *path) {
334 // don't use symlinks on windows, because it is not really useful 334 // don't use symlinks on windows, because it is not really useful
335 // however, we interpret .lnk files as symlinks 335 // however, we interpret .lnk files as symlinks
336 int ret = 0; 336 int ret = 0;
337 337
338 scstr_t path_s = scstr(path); 338 cxstring path_s = cx_str(path);
339 if(scstrsuffix(path_s, SC(".lnk"))) { 339 if(cx_strsuffix(path_s, CX_STR(".lnk"))) {
340 // looks like a .lnk file 340 // looks like a .lnk file
341 // check content 341 // check content
342 IShellLink *sl; 342 IShellLink *sl;
343 HRESULT hres; 343 HRESULT hres;
344 hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID*)&sl); 344 hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID*)&sl);

mercurial