diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-19 21:45:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-19 21:45:14 +0400 |
commit | 979bec79c373b5bfae0bfe6e74e6e92bf3214ff2 (patch) | |
tree | 291054f0baf5e95ff118137863cccf0867b4b53c /source/blender/blenlib/intern/fileops.c | |
parent | d410135408fcce7856cc044ba717297c89302a34 (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.c | 5 |
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 */ |