summaryrefslogtreecommitdiff
path: root/src/fileops.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-03-18 16:56:43 +0100
committerVicent Marti <tanoku@gmail.com>2011-03-23 00:17:24 +0200
commitc90292ce4f852ff9f0e8ec4ddc7cdc438745790d (patch)
tree4a22d71960db0c0c6381af32402cf2d4009da9d8 /src/fileops.h
parent6279abda7370ebb046571437012dc6bb96e1edba (diff)
downloadlibgit2-c90292ce4f852ff9f0e8ec4ddc7cdc438745790d.tar.gz
Change gitfo_prettify_dir_path() and gitfo_prettify_file_path() behavior
Those functions now return prettified rooted path.
Diffstat (limited to 'src/fileops.h')
-rw-r--r--src/fileops.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fileops.h b/src/fileops.h
index c2c038b26..ce236f608 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -163,12 +163,13 @@ extern int gitfo_getcwd(char *buffer_out, size_t size);
* the file system perspective.
*
* @param buffer_out buffer to populate with the normalized path.
+ * @param size buffer size.
* @param path directory path to clean up.
* @return
* - GIT_SUCCESS on success;
* - GIT_ERROR when the input path is invalid or escapes the current directory.
*/
-int gitfo_prettify_dir_path(char *buffer_out, const char *path);
+int gitfo_prettify_dir_path(char *buffer_out, size_t size, const char *path);
/**
* Clean up a provided absolute or relative file path.
@@ -185,11 +186,13 @@ int gitfo_prettify_dir_path(char *buffer_out, const char *path);
* the file system perspective.
*
* @param buffer_out buffer to populate with the normalized path.
+ * @param size buffer size.
* @param path file path to clean up.
* @return
* - GIT_SUCCESS on success;
* - GIT_ERROR when the input path is invalid or escapes the current directory.
*/
-int gitfo_prettify_file_path(char *buffer_out, const char *path);
+int gitfo_prettify_file_path(char *buffer_out, size_t size, const char *path);
+int retrieve_path_root_offset(const char *path);
#endif /* INCLUDE_fileops_h__ */