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:
authorCampbell Barton <ideasman42@gmail.com>2009-07-19 21:45:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-19 21:45:14 +0400
commit979bec79c373b5bfae0bfe6e74e6e92bf3214ff2 (patch)
tree291054f0baf5e95ff118137863cccf0867b4b53c /source/blender/blenlib/intern/fileops.c
parentd410135408fcce7856cc044ba717297c89302a34 (diff)
- Support for importing python packages. (directories of python scripts containing an __init__.py)
- BLI_add_slash returns the new string length. - BLI_where_am_i() would often have /./ in the path (not incorrect but annoying, got into python exceptions) - release/ui/space_image.py, py error referencing invalid keyword args.
Diffstat (limited to 'source/blender/blenlib/intern/fileops.c')
-rw-r--r--source/blender/blenlib/intern/fileops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 917537bf03d..42fd75a543e 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -83,19 +83,22 @@ char *BLI_last_slash(const char *string) {
}
/* adds a slash if there isnt one there alredy */
-void BLI_add_slash(char *string) {
+int BLI_add_slash(char *string) {
int len = strlen(string);
#ifdef WIN32
if (len==0 || string[len-1]!='\\') {
string[len] = '\\';
string[len+1] = '\0';
+ return len+1;
}
#else
if (len==0 || string[len-1]!='/') {
string[len] = '/';
string[len+1] = '\0';
+ return len+1;
}
#endif
+ return len;
}
/* removes a slash if there is one */