]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Document get_parent_directory more
authorPeter Palfrader <peter@palfrader.org>
Mon, 15 Jul 2013 08:46:11 +0000 (10:46 +0200)
committerNick Mathewson <nickm@torproject.org>
Mon, 15 Jul 2013 13:04:17 +0000 (09:04 -0400)
src/common/compat.c

index 69eb0643d063ac163e062205126f63f72955fb67..391f175c421de2d173cccc4931bf2fda0e7669c2 100644 (file)
@@ -1746,6 +1746,15 @@ get_user_homedir(const char *username)
  * actually examine the filesystem; does a purely syntactic modification.
  *
  * The parent of the root director is considered to be iteself.
+ *
+ * Path separators are the forward slash (/) everywhere and additionally
+ * the backslash (\) on Win32.
+ *
+ * Cuts off any number of trailing path separators but otherwise ignores
+ * them for purposes of finding the parent directory.
+ *
+ * Returns 0 if a parent directory was successfully found, -1 otherwise (fname
+ * did not have any path separators or only had them ad the end).
  * */
 int
 get_parent_directory(char *fname)