summaryrefslogtreecommitdiff
path: root/daemon/gvfsafputils.c
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2011-11-23 23:53:18 +0100
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2012-01-22 11:28:02 +0100
commitfa288893d51478daa7190bbb554779404a205157 (patch)
tree59aab57fffd88bf6731b9c46077eedc8d4ef6a37 /daemon/gvfsafputils.c
parenta1af02aee5d076e042502569d59d350d03839baf (diff)
downloadgvfs-fa288893d51478daa7190bbb554779404a205157.tar.gz
afp: split out volume specific functions into a GVfsAfpVolume object.
Diffstat (limited to 'daemon/gvfsafputils.c')
-rw-r--r--daemon/gvfsafputils.c12
1 files changed, 12 insertions, 0 deletions
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;
+}