diff options
author | Ole Loots <ole@monochrom.net> | 2013-03-22 00:26:02 +0100 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2013-03-22 00:26:02 +0100 |
commit | c91db66e2dbb0fe183b5f473bfeb454540e64a42 (patch) | |
tree | b11914cc197f030394a6fe32941642d4178f518c /atari/gui.c | |
parent | ad53da023d7126286d2b8944d52ecf65ff801a24 (diff) | |
download | netsurf-c91db66e2dbb0fe183b5f473bfeb454540e64a42.tar.gz netsurf-c91db66e2dbb0fe183b5f473bfeb454540e64a42.tar.bz2 |
Fixed handling of filepath passed via commandline.
Diffstat (limited to 'atari/gui.c')
-rw-r--r-- | atari/gui.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/atari/gui.c b/atari/gui.c index fe32a4a34..ef6ab07bd 100644 --- a/atari/gui.c +++ b/atari/gui.c @@ -1067,10 +1067,9 @@ int main(int argc, char** argv) LOG(("Creating initial browser window...")); addr = option_homepage_url; - if (strncmp(addr, "file://", 7)) { + if (strncmp(addr, "file://", 7) && strncmp(addr, "http://", 7)) { if (stat(addr, &stat_buf) == 0) { - file_url = malloc(strlen(addr)+8); - sprintf(file_url, "file://%s", addr); + file_url = local_file_to_url(addr); addr = file_url; } } |