aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-07-23 02:28:51 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2016-07-23 19:38:04 +0000
commit5488581d183cf245a9ffdeb30732f155d9db8b99 (patch)
treeb558b9f3485b2fb3320712316aec4ef4b3478d84 /ui
parent0590a4f6d82c9eb54621aba50638ecbef78dccee (diff)
Replace an #ifdef with g_path_is_absolute()
Change-Id: I0df8ea363502bb5e313192b6a10f6df032031699 Reviewed-on: https://code.wireshark.org/review/16601 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/help_url.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ui/help_url.c b/ui/help_url.c
index 0a10666afc..5ea67ba53f 100644
--- a/ui/help_url.c
+++ b/ui/help_url.c
@@ -47,13 +47,8 @@ data_file_url(const gchar *filename)
gchar *uri;
/* Absolute path? */
-#ifdef G_OS_WIN32
- if((strlen(filename) > 2) && (filename[1] == ':')) {
- file_path = g_strdup(filename);
-#else
- if((strlen(filename) > 1) && (filename[0] == '/')) {
- file_path = g_strdup(filename);
-#endif
+ if(g_path_is_absolute(filename)) {
+ file_path = g_strdup(filename);
} else if(running_in_build_directory()) {
file_path = g_strdup_printf("%s/doc/%s", get_datafile_dir(), filename);
} else {