[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16687] trunk/blender/source/blender/ blenlib/intern/util.c: Fix file browser for Windows: going to the parent directory introduces ../\.
Benoit Bolsee
benoit.bolsee at online.be
Mon Sep 22 23:15:48 CEST 2008
Revision: 16687
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16687
Author: ben2610
Date: 2008-09-22 23:15:48 +0200 (Mon, 22 Sep 2008)
Log Message:
-----------
Fix file browser for Windows: going to the parent directory introduces ../\. Correct parent is ..\ under Windows.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/util.c
Modified: trunk/blender/source/blender/blenlib/intern/util.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/util.c 2008-09-22 20:26:28 UTC (rev 16686)
+++ trunk/blender/source/blender/blenlib/intern/util.c 2008-09-22 21:15:48 UTC (rev 16687)
@@ -1060,13 +1060,18 @@
int BLI_parent_dir(char *path)
{
+#ifdef WIN32
+ static char *parent_dir="..\\";
+#else
+ static char *parent_dir="../";
+#endif
char tmp[FILE_MAXDIR+FILE_MAXFILE+4];
BLI_strncpy(tmp, path, sizeof(tmp));
BLI_add_slash(tmp);
- strcat(tmp, "../");
+ strcat(tmp, parent_dir);
BLI_cleanup_dir(NULL, tmp);
- if (!BLI_testextensie(tmp, "../")) {
+ if (!BLI_testextensie(tmp, parent_dir)) {
BLI_strncpy(path, tmp, sizeof(tmp));
return 1;
} else {
More information about the Bf-blender-cvs
mailing list