After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322905 - Inexistent pilot base directory cause connection fail in palm-sync
Inexistent pilot base directory cause connection fail in palm-sync
Status: RESOLVED FIXED
Product: gnome-pilot
Classification: Other
Component: gpilotd
2.0.x
Other Solaris
: High major
: ---
Assigned To: Matt Davey
gnome-pilot Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-01 08:49 UTC by Jerry Yu
Modified: 2006-03-13 22:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
picture about the error message (167.05 KB, image/png)
2005-12-01 09:05 UTC, Jerry Yu
  Details
proposed patch (4.04 KB, patch)
2005-12-01 09:08 UTC, Jerry Yu
none Details | Review

Description Jerry Yu 2005-12-01 08:49:47 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
Comment 1 Jerry Yu 2005-12-01 09:05:17 UTC
Created attachment 55461 [details]
picture about the error message
Comment 2 Jerry Yu 2005-12-01 09:08:06 UTC
Created attachment 55462 [details] [review]
proposed patch

It works for this bug on Solaris platform
Comment 3 Matt Davey 2006-02-01 23:12:05 UTC
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?
Comment 4 Jerry Yu 2006-03-09 09:29:36 UTC
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.
Comment 5 Matt Davey 2006-03-09 10:23:30 UTC
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.
Comment 6 Jerry Yu 2006-03-10 08:40:53 UTC
(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.
> 

Comment 7 Matt Davey 2006-03-13 22:02:17 UTC
Committed code change as described.