diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-07-15 10:46:11 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-07-15 09:04:17 -0400 |
commit | 5cc52b242e5a4380e3aea6c53606f756d0a3a48a (patch) | |
tree | bda521e52d81e6023276e029bf6f5d1dac3be3af /src/common | |
parent | 6848e29307b9bfbabf06df0aaf56062ba4638ff6 (diff) | |
download | tor-5cc52b242e5a4380e3aea6c53606f756d0a3a48a.tar.gz tor-5cc52b242e5a4380e3aea6c53606f756d0a3a48a.zip |
Document get_parent_directory more
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/compat.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index 69eb0643d0..391f175c42 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -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) |