projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a04d987
)
Added support for relative path for vimb.
author
Daniel Carl
<danielcarl@gmx.de>
Mon, 18 Mar 2013 00:30:18 +0000
(
01:30
+0100)
committer
Daniel Carl
<danielcarl@gmx.de>
Mon, 18 Mar 2013 00:30:18 +0000
(
01:30
+0100)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
0fa6b9c
..
a86e16d
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-137,6
+137,7
@@
gboolean vb_load_uri(Client* c, const Arg* arg)
{
char* uri;
char* path = arg->s;
+ struct stat st;
if (!path) {
return FALSE;
@@
-148,7
+149,7
@@
gboolean vb_load_uri(Client* c, const Arg* arg)
}
/* check if the path is a file path */
- if (
path[0] == '/' || !strcspn(path, "./")
) {
+ if (
stat(path, &st) == 0
) {
char* rp = realpath(path, NULL);
uri = g_strdup_printf("file://%s", rp);
} else {