[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55659] trunk/blender/source/blender/ editors/space_buttons/buttons_ops.c: minor fix for annoyance with directory selection on windows.
Campbell Barton
ideasman42 at gmail.com
Fri Mar 29 02:34:05 CET 2013
Revision: 55659
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55659
Author: campbellbarton
Date: 2013-03-29 01:34:04 +0000 (Fri, 29 Mar 2013)
Log Message:
-----------
minor fix for annoyance with directory selection on windows.
selecting a relative directory through BUTTONS_OT_directory_browse would convert '//' into '//\'.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_buttons/buttons_ops.c
Modified: trunk/blender/source/blender/editors/space_buttons/buttons_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_buttons/buttons_ops.c 2013-03-29 00:50:52 UTC (rev 55658)
+++ trunk/blender/source/blender/editors/space_buttons/buttons_ops.c 2013-03-29 01:34:04 UTC (rev 55659)
@@ -120,6 +120,8 @@
BLI_path_abs(path, id ? ID_BLEND_PATH(G.main, id) : G.main->name);
if (BLI_is_dir(path)) {
+ /* do this first so '//' isnt converted to '//\' on windows */
+ BLI_add_slash(path);
if (is_relative) {
BLI_strncpy(path, str, FILE_MAX);
BLI_path_rel(path, G.main->name);
@@ -129,7 +131,6 @@
else {
str = MEM_reallocN(str, strlen(str) + 2);
}
- BLI_add_slash(str);
}
else {
char * const lslash = (char *)BLI_last_slash(str);
More information about the Bf-blender-cvs
mailing list