winefile _NO_EXTENSIONS fixes
Martin Fuchs
martin-fuchs at gmx.net
Sat May 21 12:09:35 CDT 2005
Changelog:
Bug fixes for _NO_EXTENSIONS mode
Index: winefile.c
===================================================================
RCS file: /home/wine/wine/programs/winefile/winefile.c,v
retrieving revision 1.41
diff -u -p -d -r1.41 winefile.c
--- winefile.c 19 May 2005 14:22:51 -0000 1.41
+++ winefile.c 21 May 2005 16:59:35 -0000
@@ -315,6 +315,15 @@ static void read_directory_win(Entry* di
if (hFind != INVALID_HANDLE_VALUE) {
do {
+#ifdef _NO_EXTENSIONS
+ /* hide directory entry "." */
+ if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ LPCTSTR name = w32fd.cFileName;
+
+ if (name[0]=='.' && name[1]=='\0')
+ continue;
+ }
+#endif
entry = alloc_entry();
if (!first_entry)
@@ -330,15 +339,7 @@ static void read_directory_win(Entry* di
entry->scanned = FALSE;
entry->level = level;
-#ifdef _NO_EXTENSIONS
- /* hide directory entry "." */
- if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
- LPCTSTR name = entry->data.cFileName;
-
- if (name[0]=='.' && name[1]=='\0')
- continue;
- }
-#else
+#ifndef _NO_EXTENSIONS
entry->etype = ET_WINDOWS;
entry->bhfi_valid = FALSE;
@@ -356,9 +357,10 @@ static void read_directory_win(Entry* di
#endif
last = entry;
- } while(FindNextFile(hFind, &entry->data));
+ } while(FindNextFile(hFind, &w32fd));
- last->next = NULL;
+ if (last)
+ last->next = NULL;
FindClose(hFind);
}
@@ -524,7 +526,8 @@ static void read_directory_unix(Entry* d
last = entry;
}
- last->next = NULL;
+ if (last)
+ last->next = NULL;
closedir(pdir);
}
@@ -3333,7 +3336,9 @@ static void refresh_child(ChildWnd* chil
static void create_drive_bar()
{
TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0};
+#ifndef _NO_EXTENSIONS
TCHAR b1[BUFFER_LEN];
+#endif
int btn = 1;
PTSTR p;
Index: winefile.h
===================================================================
RCS file: /home/wine/wine/programs/winefile/winefile.h,v
retrieving revision 1.10
diff -u -p -d -r1.10 winefile.h
--- winefile.h 22 Nov 2004 18:24:09 -0000 1.10
+++ winefile.h 21 May 2005 16:59:36 -0000
@@ -38,6 +38,7 @@
#include <commctrl.h>
#include <commdlg.h>
#include <shellapi.h>
+#include <shlobj.h>
#include <stdlib.h>
#include <stdio.h>
#include <tchar.h>
@@ -102,9 +103,6 @@ enum IMAGE {
#ifndef _NO_EXTENSIONS
#define _SHELL_FOLDERS
-
-#include <objbase.h>
-#include <shlobj.h>
#endif
More information about the wine-patches
mailing list