Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-12-14 16:21:32 +0300
committerTon Roosendaal <ton@blender.org>2005-12-14 16:21:32 +0300
commitf88a0a6efdd1b32b67fe7f1f7fe533426e62e08c (patch)
tree752a95449c943e7de03147a2cf8af4b6614b4e59 /source/blender/blenlib/BLI_blenlib.h
parentcb57d03e9791527abbf7ce3c522899ea0e95e7e2 (diff)
Orange: more relative path code cleanup. Introduced a new call in the
blenlib to correctly convert a relative path to a clean new path: BLI_cleanup_dir(const char *relabase, char *name); Only works for directories now.
Diffstat (limited to 'source/blender/blenlib/BLI_blenlib.h')
-rw-r--r--source/blender/blenlib/BLI_blenlib.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h
index 15ab7825cf6..7a5e162a4b8 100644
--- a/source/blender/blenlib/BLI_blenlib.h
+++ b/source/blender/blenlib/BLI_blenlib.h
@@ -112,6 +112,13 @@ void BLI_freelinkN(ListBase *listbase, void *vlink);
void BLI_splitdirstring(char *di,char *fi);
/**
+ * dir can be any input, like from buttons, and this function
+ * converts it to a regular full path.
+ * Also removes garbage from directory paths, like /../ or double slashes etc
+ */
+void BLI_cleanup_dir(const char *relabase, char *dir);
+
+ /**
* Blender's path code replacement function.
* Bases @a path strings leading with "//" by the
* directory @a basepath, and replaces instances of
@@ -123,7 +130,7 @@ void BLI_splitdirstring(char *di,char *fi);
* @a framenum The framenumber to replace the frame code with.
* @retval Returns true if the path was relative (started with "//").
*/
-int BLI_convertstringcode(char *path, char *basepath, int framenum);
+int BLI_convertstringcode(char *path, const char *basepath, int framenum);
void BLI_makestringcode(const char *relfile, char *file);