vb.config.download_dir = NULL;
}
path = util_expand(s->arg.s);
- /* if path is not absolute create it in the home directory */
- if (*path != G_DIR_SEPARATOR) {
+ /* if path is not absolute set it in the home directory */
+ if (*path != '/') {
vb.config.download_dir = g_build_filename(util_get_home_dir(), path, NULL);
g_free(path);
} else {
/* 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 */
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 = '/';
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++;
}