On Sat, 23 Sep 2006 14:04:20 +0200 Uwe Helm <digitalenemy@xxxxxxxxx> wrote: > On Thu, 2006-09-21 at 13:31 -0400, tpgww@xxxxxxxxxxx wrote: > > On Wed, 20 Sep 2006 19:39:39 +0200 > > Uwe Helm <digitalenemy@xxxxxxxxx> wrote: > > > > > this is for example: > > > - config file gets cleared if there is no more hd space > > When saving config data, it's written to a temp-file in the > > currently-used config directory, and if that write is completed > > successfully, then the temp is renamed. Or if the write fails for some > > reason, the temp is deleted. So when a disk is full, the > > most-recently-saved config file should still be there. Is that not > > working ? > > > No, it is not working. I have just forced this: > > ---> started emelfm2 > > uwe@milkplus ~ $ ls -al .config/emelfm2/ > -rw-r--r-- 1 uwe users 4698 2006-09-23 13:37 cache > -rw-r--r-- 1 uwe users 24212 2006-09-23 13:37 config-en_US.utf8 > > ----> filling up the partition > ----> closing emelfm2 > > uwe@milkplus ~ $ ls -al .config/emelfm2/ > -rw-r--r-- 1 uwe users 4707 2006-09-23 13:56 cache > -rw-r--r-- 1 uwe users 0 2006-09-23 13:56 config-en_US.utf8 The temp-file was being renamed even if it was not written successfully. The following will fix that: --- e2_option.c 2006-07-29 19:32:19.000000000 -0400 +++ e2_option.c 2006-09-24 18:10:11.000000000 -0400 @@ -648,16 +648,20 @@ if (write_error) goto error_handler; - } + e2_fs_file_close (f); - goto clean_exit; + e2_task_backend_rename (tempname, local); + goto cleanup; + } error_handler: + if (f != NULL) + { e2_fs_file_close (f); e2_task_backend_delete (tempname); + } gchar *msg = g_strdup_printf (_("Cannot write config file: %s (%s)"), filepath, g_strerror (errno)); e2_output_print_error (msg, TRUE); sleep (1); -clean_exit: - e2_task_backend_rename (tempname, local); +cleanup: F_FREE (local); g_free (tempname); Regards Tom -- Users can unsubscribe from the list by sending email to emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by logging into the web interface.