diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-11-28 12:59:10 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-11-28 12:59:10 +0100 |
commit | ca6b1a8178430e871d16a831d78db2256604054c (patch) | |
tree | 06a76c6c66a136fd602dd4ff1db5b520acb188c2 | |
parent | bf60d9c01c9eb04b9b9ab825a77e2eebdeb905c2 (diff) |
Fixing path.
-rw-r--r-- | source/helper.c | 7 | ||||
-rwxr-xr-x | test/run_script_test.sh | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/helper.c b/source/helper.c index 5a09f41e..2b99a1c0 100644 --- a/source/helper.c +++ b/source/helper.c @@ -680,6 +680,13 @@ char *rofi_expand_path ( const char *input ) str[i] = g_strdup ( p->pw_dir ); } } + else if ( i == 0 ) { + char * s = str[i]; + if ( input[0] == G_DIR_SEPARATOR ) { + str[i] = g_strdup_printf ( "%s%s", G_DIR_SEPARATOR_S, s ); + g_free ( s ); + } + } } char *retv = g_build_filenamev ( str ); g_strfreev ( str ); diff --git a/test/run_script_test.sh b/test/run_script_test.sh index 1279e30c..dc8fa4d4 100755 --- a/test/run_script_test.sh +++ b/test/run_script_test.sh @@ -18,6 +18,7 @@ xdotool key Return wait ${RPID} RETV=$? OUTPUT=$(cat output.txt | tr '\n' ' ') +echo ${OUTPUT} if [ "${OUTPUT}" != 'noot ' ] then exit 1 |