Bruno Jesus : winecfg: No need to cut a backslash if it does not exist.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 24 08:32:35 CDT 2014


Module: wine
Branch: master
Commit: c5aacafeeaa2cf15612fc5318262140cbd92bd56
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c5aacafeeaa2cf15612fc5318262140cbd92bd56

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Fri Oct 24 01:37:00 2014 -0200

winecfg: No need to cut a backslash if it does not exist.

---

 programs/winecfg/appdefaults.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/programs/winecfg/appdefaults.c b/programs/winecfg/appdefaults.c
index 6106b23..7dd3900 100644
--- a/programs/winecfg/appdefaults.c
+++ b/programs/winecfg/appdefaults.c
@@ -377,19 +377,17 @@ static void on_remove_app_click(HWND dialog)
 {
     HWND listview = GetDlgItem(dialog, IDC_APP_LISTVIEW);
     int selection = get_listview_selection(listview);
-    char *section = keypath(""); /* AppDefaults\\whatever.exe\\ */
     LVITEMW item;
 
     item.iItem = selection;
     item.iSubItem = 0;
     item.mask = LVIF_PARAM;
 
-    WINE_TRACE("selection=%d, section=%s\n", selection, section);
-    
+    WINE_TRACE("selection=%d\n", selection);
+
     assert( selection != 0 ); /* user cannot click this button when "default settings" is selected  */
 
-    section[strlen(section)] = '\0'; /* remove last backslash  */
-    set_reg_key(config_key, section, NULL, NULL); /* delete the section  */
+    set_reg_key(config_key, keypath(""), NULL, NULL); /* delete the section  */
     SendMessageW(listview, LVM_GETITEMW, 0, (LPARAM) &item);
     HeapFree (GetProcessHeap(), 0, (void*)item.lParam);
     SendMessageW(listview, LVM_DELETEITEM, selection, 0);




More information about the wine-cvs mailing list