Windows: use _wfullpath for realpath
This commit is contained in:
parent
e12ca55ee0
commit
24bd6735bc
@ -1,8 +1,5 @@
|
|||||||
|
WCHAR* realpath (const WCHAR*__restrict path, WCHAR*__restrict resolved_path) {
|
||||||
#include "realpath.h"
|
return _wfullpath(NULL, path, 0);
|
||||||
|
|
||||||
char* realpath (const char *__restrict path, char *__restrict resolved_path) {
|
|
||||||
return _fullpath(NULL, path, 0);
|
|
||||||
}
|
}
|
||||||
bool winIsAbsolute(const char* path) { // TODO something more proper
|
bool winIsAbsolute(const char* path) { // TODO something more proper
|
||||||
return *path && path[1]==':' && (!path[2] || path[2]=='/' || path[2]=='\\');
|
return *path && path[1]==':' && (!path[2] || path[2]=='/' || path[2]=='\\');
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
#ifndef REALPATH_H
|
|
||||||
#define REALPATH_H
|
|
||||||
|
|
||||||
char* realpath(const char *__restrict path, char *__restrict resolved_path);
|
|
||||||
bool winIsAbsolute(const char* path);
|
|
||||||
|
|
||||||
#endif /* REALPATH_H */
|
|
||||||
Loading…
Reference in New Issue
Block a user