[Bf-committers] Fix for #913 "inconsistent .B.blend loading/saving"

Bill Baxter bf-committers@blender.org
Mon, 26 Jan 2004 10:57:52 -0500


This is a multi-part message in MIME format.
--------------080701090507080907070100
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hey Ton,

Ok. You might want to update this page:
    http://www.blender.org/docs/intro_source.html#submitting
It says just use straight diff, which I thought couldn't be right 
because that gives absolutely no context, so patch is likely to botch 
the merge.  So I opted for diff -c ("context diff")

The diff -u version is attached.

Like I said, it looks like someone was in the middle of changing things 
over to do user file load/save differently on Windows, but didn't finish 
the job.  This patch just comments out the two ifdef WIN32 blocks that 
broke preference loading.  (And thus puts prefs back in $HOME/.B.blend)

However, I would still like to know why you'd want to put user files in 
Windows under $HOME/.blender instead of just $HOME.  If the change makes 
sense for Windows then it probably makes sense for other platforms too, 
and the code would be less error-prone without all the ifdefs.

Incidentally, has anyone noticed that there's a bug in the Windows 
explorer that won't let you rename a file to ".B.blend"? Gotta love that.

--bb




Ton Roosendaal wrote:

> Hi Bill,
>
> Thanks, your bug crunching is much appreciated, but the syntax you 
> use  for diff is new to me...
> We use 'diff -u' here, which gives readable results.
>
> The patch you sent after this mail for 'no numpad minus key' is 
> simple  though, and I'll commit that right away.
>
> Welcome to the bf-committers list!
>
> -Ton-
>
>
>
> On Monday, Jan 26, 2004, at 06:18 Europe/Amsterdam, Bill Baxter wrote:
>
>> I'm sure aphex can take care of this, but this patch is a really  
>> simple 2-line fix for #913.
>>
>> It looks like there's some greater plan at works to revamp the file  
>> structure on Windows, but it ain't working (and wasn't working in  
>> 2.31a), so better to just comment it out for this feature freeze 
>> than  to release another build with the prefs broken.
>>
>> In the long term I question why you would *want* to make only 
>> Windows  load and save things from ~/.blender?  If it's good for 
>> Windows why  not do that for all platforms, and avoid adding all 
>> those ifdefs?
>>
>> --bb
>> Index: source/blender/src/usiblender.c
>> ===================================================================
>> RCS file: /cvsroot/bf-blender/blender/source/blender/src/usiblender.c,v
>> retrieving revision 1.45
>> diff -c -r1.45 usiblender.c
>> *** source/blender/src/usiblender.c    23 Jan 2004 16:02:10 -0000    
>> 1.45
>> --- source/blender/src/usiblender.c    26 Jan 2004 05:10:10 -0000
>> ***************
>> *** 420,426 ****
>>          To be removed at v2.4 or so! ;)
>>       */
>>
>> ! #ifdef WIN32
>>       char dir[FILE_MAXDIR+FILE_MAXFILE];
>>       BLI_getInstallationDir(dir);
>>
>> --- 420,426 ----
>>          To be removed at v2.4 or so! ;)
>>       */
>>
>> ! #if 0
>>       char dir[FILE_MAXDIR+FILE_MAXFILE];
>>       BLI_getInstallationDir(dir);
>>
>> Index: source/blender/blenloader/intern/writefile.c
>> ===================================================================
>> RCS file:  
>> /cvsroot/bf-blender/blender/source/blender/blenloader/intern/ 
>> writefile.c,v
>> retrieving revision 1.15
>> diff -c -r1.15 writefile.c
>> *** source/blender/blenloader/intern/writefile.c    7 Jan 2004 
>> 21:03:11  -0000    1.15
>> --- source/blender/blenloader/intern/writefile.c    26 Jan 2004 
>> 05:10:13  -0000
>> ***************
>> *** 1608,1614 ****
>>           return 0;
>>       }
>>      
>> ! #ifdef WIN32
>>       BLI_getInstallationDir(tmpdir);
>>
>>       if(BLI_exists(tmpdir))
>> --- 1608,1614 ----
>>           return 0;
>>       }
>>      
>> ! #if 0
>>       BLI_getInstallationDir(tmpdir);
>>
>>       if(BLI_exists(tmpdir))
>>
> ------------------------------------------------------------------------ 
> -- 
> Ton Roosendaal  Blender Foundation ton@blender.org  
> http://www.blender.org
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers



--------------080701090507080907070100
Content-Type: text/plain;
 name="patch_dirs.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch_dirs.txt"

Index: source/blender/src/usiblender.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/usiblender.c,v
retrieving revision 1.45
diff -u -r1.45 usiblender.c
--- source/blender/src/usiblender.c	23 Jan 2004 16:02:10 -0000	1.45
+++ source/blender/src/usiblender.c	26 Jan 2004 15:41:52 -0000
@@ -420,7 +420,7 @@
 	   To be removed at v2.4 or so! ;)
 	*/
 
-#ifdef WIN32
+#if 0
 	char dir[FILE_MAXDIR+FILE_MAXFILE];
 	BLI_getInstallationDir(dir);
 
Index: source/blender/blenloader/intern/writefile.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/blenloader/intern/writefile.c,v
retrieving revision 1.15
diff -u -r1.15 writefile.c
--- source/blender/blenloader/intern/writefile.c	7 Jan 2004 21:03:11 -0000	1.15
+++ source/blender/blenloader/intern/writefile.c	26 Jan 2004 15:41:54 -0000
@@ -1608,7 +1608,7 @@
 		return 0;
 	}
 	
-#ifdef WIN32
+#if 0
 	BLI_getInstallationDir(tmpdir);
 
 	if(BLI_exists(tmpdir))

--------------080701090507080907070100--