Mailinglist Archive: opensuse-bugs (4661 mails)

< Previous Next >
[Bug 1041829] [Build 20170516] yast2_ftp fails with "UI Syntax Error" - "Invalid Arguments for the Label widgets"
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Thu, 01 Jun 2017 10:08:56 +0000
  • Message-id: <bug-1041829-21960-xfHpWXZP9y@http.bugzilla.suse.com/>
http://bugzilla.suse.com/show_bug.cgi?id=1041829
http://bugzilla.suse.com/show_bug.cgi?id=1041829#c12

--- Comment #12 from Stefan Hundhammer <shundhammer@xxxxxxxx> ---
AFAICS this is about widget "FtpDirLocal" which is created here:

https://github.com/yast/yast-ftp-server/blob/master/src/include/ftp-server/wid_functions.rb#L794

(on the UI it's obviously called "Ftp Directory for Authenticated Users")

I suspect the problem is here:

https://github.com/yast/yast-ftp-server/blob/master/src/include/ftp-server/wid_functions.rb#L823

The return value of UI.AskForExistingDirectory() is set as that widget's
'Value' property without any check. But the documentation of that function
explicitly says that it will return 'nil' if the user canceled that directory
selection pop-up with the [Cancel] button:

https://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/AskForExistingDirectory.html

In that case, 'val' becomes 'nil', The 'Value' property is set to this 'nil',
and the UI (correctly!) complains that this is an invalid value for the Label
widget.

Solution:

Check for 'nil' and NOT change the widget in that case - that was the user's
intention when he hit [Cancel] (not changing anything).

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >