Windows: use _wfullpath for realpath
This commit is contained in:
parent
e12ca55ee0
commit
24bd6735bc
@ -1,9 +1,6 @@
|
||||
|
||||
#include "realpath.h"
|
||||
|
||||
char* realpath (const char *__restrict path, char *__restrict resolved_path) {
|
||||
return _fullpath(NULL, path, 0);
|
||||
WCHAR* realpath (const WCHAR*__restrict path, WCHAR*__restrict resolved_path) {
|
||||
return _wfullpath(NULL, path, 0);
|
||||
}
|
||||
bool winIsAbsolute(const char* path) { // TODO something more proper
|
||||
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