GNOME Bugzilla – Bug 322905
Inexistent pilot base directory cause connection fail in palm-sync
Last modified: 2006-03-13 22:02:17 UTC
Please describe the problem: Edit the base directory in Evolution->Tools->Pilot Settings ->Pilot, change the value from default one to an inexistent directory. Press HotSync button on Palm, then an error message will appears asking for fix(Pls see attachment). Then you will find that all the connection behavior,such as "Sync"\"Copy to"\"Copy from", don't work for all component, even you have changed the directory from the inexistent directory to the former default value. Logout and login again, all the connection behavior work again. Steps to reproduce: How to reproduce: 1.Startup "Email and Calendar" in Launch Menu. 2.In evolution,select Top Menu->Tools->Pilot Settings ->Pilot 3.Click "Edit" Button to change the directory value from default one to an inexistent directory. 4.Press HotSync button on Palm Actual results: Expected results: Does this happen every time? Yes Other information: Version details: gnome-pilot 2.0.13 Distribution/Version: Solaris NV 24
Created attachment 55461 [details] picture about the error message
Created attachment 55462 [details] [review] proposed patch It works for this bug on Solaris platform
Good catch... check_base_directory() is called by the druid, but not by the capplet. I think that the patch could be simplified by adding a call to check_base_directory() directly within gnome_pilot_pdialog_run_and_close(), preventing any call being made to read_pilot_config() until the check succeeds or the dialog is cancelled. What do you think? Do you fancy revising the patch, or will I have a go?
Could you please do the patch per your idea? I think our patch is more convenient to users although it is a little more complicated. -The device dialog isn't closed and a error dialog appears until check_base_directory() returns TRUE, which reminds users that the directory isn't accessible. -The old values are restored when the device dialog is cancelled, which don't need users type the proper directory again.
OK, I'll take a look at this. My take on the recommended behaviour is that if the user hits 'cancel', the original value should be restored, but if the user mis-types a directory name then his mis-typing should still be visible, so that it can be corrected. By the way, check_base_directory() will attempt to create a directory if it doesn't already exist. That might be a bit drastic, I suppose, but it is the druid behaviour already.
(In reply to comment #5) > OK, I'll take a look at this. > My take on the recommended behaviour is that if the user hits 'cancel', the > original value should be restored, but if the user mis-types a directory name > then his mis-typing should still be visible, so that it can be corrected. If the user mis-types a directory name, he has two options: --hits "OK", a error message appears,at the same time his mis-typing is still visible so that it can be corrected. --hits "cancel", the old correct values are restored. > > By the way, check_base_directory() will attempt to create a directory if it > doesn't already exist. That might be a bit drastic, I suppose, but it is > the druid behaviour already. >
Committed code change as described.