# HG changeset patch # User zas_ # Date 1211320814 0 # Node ID 28af4b6dd9efe06f855359db646fc36b160607b2 # Parent b2eb4ff74d131074d34535a84e27c7caad73bb9a Use G_DIR_SEPARATOR instead of '/' where applicable. diff -r b2eb4ff74d13 -r 28af4b6dd9ef src/ui_fileops.c --- a/src/ui_fileops.c Tue May 20 21:51:25 2008 +0000 +++ b/src/ui_fileops.c Tue May 20 22:00:14 2008 +0000 @@ -596,7 +596,7 @@ if (!path) return NULL; - base = strrchr(path, '/'); + base = strrchr(path, G_DIR_SEPARATOR); if (base) return base + 1; return path; @@ -610,7 +610,7 @@ while (path[p]) { - if (path[p] == '/') n = p; + if (path[p] == G_DIR_SEPARATOR) n = p; p++; } if (n <= 0) n++; @@ -674,15 +674,15 @@ while (path[s] != '\0') { - if (path[s] == '/' && path[s+1] == '.' && (path[s+2] == '/' || path[s+2] == '\0') ) + if (path[s] == G_DIR_SEPARATOR && path[s+1] == '.' && (path[s+2] == G_DIR_SEPARATOR || path[s+2] == '\0') ) { s += 2; } - else if (path[s] == '/' && path[s+1] == '.' && path[s+2] == '.' && (path[s+3] == '/' || path[s+3] == '\0') ) + else if (path[s] == G_DIR_SEPARATOR && path[s+1] == '.' && path[s+2] == '.' && (path[s+3] == G_DIR_SEPARATOR || path[s+3] == '\0') ) { s += 3; if (t > 0) t--; - while (path[t] != '/' && t > 0) t--; + while (path[t] != G_DIR_SEPARATOR && t > 0) t--; } else { @@ -691,8 +691,8 @@ s++; } } - if (t == 0 && path[t] == '/') t++; - if (t > 1 && path[t-1] == '/') t--; + if (t == 0 && path[t] == G_DIR_SEPARATOR) t++; + if (t > 1 && path[t-1] == G_DIR_SEPARATOR) t--; path[t] = '\0'; }