From fa288893d51478daa7190bbb554779404a205157 Mon Sep 17 00:00:00 2001 From: Carl-Anton Ingmarsson Date: Wed, 23 Nov 2011 23:53:18 +0100 Subject: afp: split out volume specific functions into a GVfsAfpVolume object. --- daemon/gvfsafputils.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'daemon/gvfsafputils.c') diff --git a/daemon/gvfsafputils.c b/daemon/gvfsafputils.c index 9d0872db..7875390b 100644 --- a/daemon/gvfsafputils.c +++ b/daemon/gvfsafputils.c @@ -126,3 +126,15 @@ afp_result_code_to_gerror (AfpResultCode res_code) return g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, _("Got unknown error code %d from server"), res_code); } + +gboolean +is_root (const char *filename) +{ + const char *p; + + p = filename; + while (*p == '/') + p++; + + return *p == 0; +} -- cgit v1.2.1