Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8540) civclientrc incompatibility
Home

[Freeciv-Dev] Re: (PR#8540) civclientrc incompatibility

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8540) civclientrc incompatibility
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Apr 2004 09:10:17 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8540 >

Jason Short wrote:

> Alternately we could reload the file right before the save, as Mike 
> suggests.  Maybe that would be easier?  I dunno.

I think it is safer, since loading can sometimes fail.

jason

? cma_weirdness
? data/civ3
? data/womoks
Index: client/options.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/options.c,v
retrieving revision 1.96
diff -u -r1.96 options.c
--- client/options.c    3 Apr 2004 01:57:22 -0000       1.96
+++ client/options.c    20 Apr 2004 16:08:49 -0000
@@ -539,7 +539,9 @@
     return;
   }
 
-  section_file_init(&sf);
+  if (!section_file_load(&sf, name)) {
+    section_file_init(&sf);
+  }
   secfile_insert_str(&sf, VERSION_STRING, "client.version");
 
   for (i = 0; i < num_options; i++) {

[Prev in Thread] Current Thread [Next in Thread]