Move string functions/utils from HAL to std/string
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include "path.h"
|
||||
#include "hal/hal.h"
|
||||
#include "std/string.h"
|
||||
|
||||
void path_parse(const char *in, char *mp, char *path) {
|
||||
if (in == 0 || *in == 0) {
|
||||
@ -45,8 +46,8 @@ void path_parse(const char *in, char *mp, char *path) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (hal_strstr(path, "/../") || hal_strstr(path, "/./")
|
||||
|| hal_strcmp(path, "..") == 0 || hal_strcmp(path, ".") == 0) {
|
||||
if (strstr(path, "/../") || strstr(path, "/./")
|
||||
|| strcmp(path, "..") == 0 || strcmp(path, ".") == 0) {
|
||||
mp[0] = 0;
|
||||
path[0] = 0;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user