summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2014-03-12 20:44:05 +0100
committerDaniel Carl <danielcarl@gmx.de>2014-03-12 20:44:05 +0100
commit1d07631cfbd6d29deb59655ee56d00a2eef344d7 (patch)
tree6966d96f3bf08def87ac0ba9e72c9cdb06b8a232 /src/util.c
parentf3dbe1cf68ac321907c1d02bc538cc20fd4f7027 (diff)
Replace G_DIR_SEPARATOR by / this is easier to read.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index 38212d6..63f0654 100644
--- a/src/util.c
+++ b/src/util.c
@@ -303,7 +303,7 @@ char *util_build_path(const char *path, const char *dir)
/* if the path could be expanded */
if ((fexp = util_expand(path))) {
- if (*fexp == G_DIR_SEPARATOR) {
+ if (*fexp == '/') {
/* path is already absolute, no need to use given dir - there is
* no need to free fexp, bacuse this should be done by the caller
* on fullPath later */
@@ -324,7 +324,7 @@ char *util_build_path(const char *path, const char *dir)
fullPath = g_build_filename(g_get_current_dir(), path, NULL);
}
- if ((p = strrchr(fullPath, G_DIR_SEPARATOR))) {
+ if ((p = strrchr(fullPath, '/'))) {
*p = '\0';
util_create_dir_if_not_exists(fullPath);
*p = '/';
@@ -353,12 +353,12 @@ char *util_expand(const char *src)
if (*src == '~' && start) {
/* skip the ~ */
src++;
- if (*src == G_DIR_SEPARATOR) {
+ if (*src == '/') {
g_string_append(dst, util_get_home_dir());
} else {
name = g_string_new("");
/* look ahead to / space or end of string */
- while (*src && *src != G_DIR_SEPARATOR && !VB_IS_SPACE(*src)) {
+ while (*src && *src != '/' && !VB_IS_SPACE(*src)) {
g_string_append_c(name, *src);
src++;
}