Optionally map the unix filesystem instead of drive letters into the shell namespace

Michael Lin mlin at corvu.com.au
Thu May 26 20:03:26 CDT 2005


Hi Michael,

>I chose to add a ShowUnixFilesystem option to wine's configuration. 
>Conceptually, the unix filesystem stuff should work with all applications 
>that browse the shell namespace in their file dialogs. So if it doesn't work 
>for a certain application (which I'm pretty sure it does), this should be 
>considered a bug in shfldr_unixfs.c. In my opinion this justifies to make 
>ShowUnixFilesystem a global option. If you don't think so, then please 
>consider this patch a proposal for a discussion on how this should be done.
>  
>
Just a few things with this approach.
As I mentioned before .. with a global flag in the registry.
User can't run a winelib application with unix path and a Windows 
application on Wine with dos path at the same time.
Ok ... I know your approach is base everything on dos path and the 
global flag is simply a display mode.
But what about the parsing of the file name editbox in the file dialog?
The user is browsing unix file system, but does the user enter unix or 
dos path?
I believe I can modify your solution to accept unix file path, but it 
have to accept dos path as well.
Then there is also the issue of having to have the unix root mapped to a 
dos drive.

Troy, Alexandre and I have been discussing other possible solutions to 
this problem offline.

One solution I have implemented and waiting on Alexandre's verdict is 
the following.

Create a new library called wineunixfs. All additional entry point 
should be in that library.
All exported function call should be of the same signiture as one in the 
core library such as GetOpenFileNameA(), GetOpenFileNameW() etc.
To use the library, simply let winelib application link it before all 
the other core libraries.

My Changes to the core libraries are contained within shell32. There is 
only one extra exported functions SHUnixFSGetDesktopFolder() being 
added. This function return the desktop folder in unix mode.

Currenlt wineunixfs duplicates filedlg.c, filedlgbrowser.* and their 
dependent files from commdlg.
I have attached the diff file for the rest of the changes that's on the 
core libraries.

I know the patch is quite big, as the solution is more involved and I 
have gone further to implement things such as rename, new folder and 
filename parsing.

What does everyone think?

Michael

-------------- next part --------------
? dlls/wineunixfs
Index: configure
===================================================================
RCS file: /home/wine/wine/configure,v
retrieving revision 1.653
diff -u -r1.653 configure
--- configure	24 May 2005 14:16:16 -0000	1.653
+++ configure	25 May 2005 05:37:17 -0000
@@ -20095,7 +20095,7 @@
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wineunixfs/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -20808,6 +20808,7 @@
   "dlls/wined3d/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/wined3d/Makefile" ;;
   "dlls/winedos/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winedos/Makefile" ;;
   "dlls/wineps/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/wineps/Makefile" ;;
+  "dlls/wineunixfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/wineunixfs/Makefile" ;;
   "dlls/wininet/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/wininet/Makefile" ;;
   "dlls/wininet/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/wininet/tests/Makefile" ;;
   "dlls/winmm/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/winmm/Makefile" ;;
Index: dlls/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/Makefile.in,v
retrieving revision 1.243
diff -u -r1.243 Makefile.in
--- dlls/Makefile.in	19 May 2005 21:18:53 -0000	1.243
+++ dlls/Makefile.in	25 May 2005 05:37:18 -0000
@@ -146,6 +146,7 @@
 	winaspi \
 	winedos \
 	wineps \
+	wineunixfs \
 	wininet \
 	winmm \
 	winmm/joystick \
@@ -397,6 +398,7 @@
 	winenas.drv.so \
 	wineoss.drv.so \
 	wineps.drv.so \
+	wineunixfs.dll.so \
 	winetty.drv.so \
 	wininet.dll.so \
 	winmm.dll.so \
@@ -944,6 +946,9 @@
 wineps.drv.so: wineps/wineps.drv.so
 	$(RM) $@ && $(LN_S) wineps/wineps.drv.so $@
 
+wineunixfs.dll.so: wineunixfs/wineunixfs.dll.so
+	$(RM) $@ && $(LN_S) wineunixfs/wineunixfs.dll.so $@
+
 wineps16.drv.so : wineps.drv.so
 	$(RM) $@ && $(LN_S) wineps.drv.so $@
 
@@ -1167,6 +1172,7 @@
 	win32s/libw32skrnl.$(IMPLIBEXT) \
 	wined3d/libwined3d.$(IMPLIBEXT) \
 	winedos/libwinedos.$(IMPLIBEXT) \
+	wineunixfs/libwineunixfs.$(IMPLIBEXT) \
 	wininet/libwininet.$(IMPLIBEXT) \
 	winmm/libwinmm.$(IMPLIBEXT) \
 	winnls/libwinnls32.$(IMPLIBEXT) \
@@ -1541,6 +1547,9 @@
 winedos/libwinedos.$(IMPLIBEXT): winedos/winedos.spec $(WINEBUILD)
 	@cd winedos && $(MAKE) libwinedos.$(IMPLIBEXT)
 
+wineunixfs/libwineunixfs.$(IMPLIBEXT): wineunixfs/wineunixfs.spec $(WINEBUILD)
+	@cd wineunixfs && $(MAKE) libwineunixfs.$(IMPLIBEXT)
+
 wininet/libwininet.$(IMPLIBEXT): wininet/wininet.spec $(WINEBUILD)
 	@cd wininet && $(MAKE) libwininet.$(IMPLIBEXT)
 
@@ -1616,6 +1625,9 @@
 libw32skrnl.$(IMPLIBEXT): win32s/libw32skrnl.$(IMPLIBEXT)
 	$(RM) $@ && $(LN_S) win32s/libw32skrnl.$(IMPLIBEXT) $@
 
+libwineunixfs.$(IMPLIBEXT): wineunixfs/libwineunixfs.$(IMPLIBEXT)
+	$(RM) $@ && $(LN_S) wineunixfs/libwineunixfs.$(IMPLIBEXT) $@
+
 libwinnls32.$(IMPLIBEXT): winnls/libwinnls32.$(IMPLIBEXT)
 	$(RM) $@ && $(LN_S) winnls/libwinnls32.$(IMPLIBEXT) $@
 
@@ -1780,6 +1792,7 @@
 winmm/winenas/winenas.drv.so: winmm/winenas
 winmm/wineoss/wineoss.drv.so: winmm/wineoss
 wineps/wineps.drv.so: wineps
+wineunixfs/wineunixfs.dll.so: wineunixfs
 ttydrv/winetty.drv.so: ttydrv
 x11drv/winex11.drv.so: x11drv
 wininet/wininet.dll.so: wininet
Index: dlls/shell32/changenotify.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/changenotify.c,v
retrieving revision 1.33
diff -u -r1.33 changenotify.c
--- dlls/shell32/changenotify.c	16 Dec 2004 14:42:31 -0000	1.33
+++ dlls/shell32/changenotify.c	25 May 2005 05:37:18 -0000
@@ -276,7 +276,7 @@
 /*************************************************************************
  * SHChangeNotify				[SHELL32.@]
  */
-void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
+void WINAPI SHCommonChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2, BOOL bUnixFS)
 {
     LPCITEMIDLIST Pidls[2];
     LPNOTIFICATIONLIST ptr;
@@ -316,12 +316,28 @@
     switch (typeFlag)
     {
     case SHCNF_PATHA:
-        if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1);
-        if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2);
+	if (!bUnixFS)
+	{
+            if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1);
+            if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2);
+	}
+	else
+	{
+            if (dwItem1) Pidls[0] = SHUnixFSSimpleIDListFromPathA((LPCSTR)dwItem1);
+            if (dwItem2) Pidls[1] = SHUnixFSSimpleIDListFromPathA((LPCSTR)dwItem2);
+	}
         break;
     case SHCNF_PATHW:
-        if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1);
-        if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW((LPCWSTR)dwItem2);
+	if (!bUnixFS)
+	{
+            if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1);
+            if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW((LPCWSTR)dwItem2);
+	}
+	else
+	{
+            if (dwItem1) Pidls[0] = SHUnixFSSimpleIDListFromPathW((LPCWSTR)dwItem1);
+            if (dwItem2) Pidls[1] = SHUnixFSSimpleIDListFromPathW((LPCWSTR)dwItem2);
+	}
         break;
     case SHCNF_IDLIST:
         Pidls[0] = (LPCITEMIDLIST)dwItem1;
@@ -405,6 +421,16 @@
         if (Pidls[0]) SHFree((LPITEMIDLIST)Pidls[0]);
         if (Pidls[1]) SHFree((LPITEMIDLIST)Pidls[1]);
     }
+}
+
+void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
+{
+    SHCommonChangeNotify(wEventId, uFlags, dwItem1, dwItem2, FALSE);
+}
+
+void WINAPI SHUnixFSChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
+{
+    SHCommonChangeNotify(wEventId, uFlags, dwItem1, dwItem2, TRUE);
 }
 
 /*************************************************************************
Index: dlls/shell32/cpanelfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/cpanelfolder.c,v
retrieving revision 1.17
diff -u -r1.17 cpanelfolder.c
--- dlls/shell32/cpanelfolder.c	10 May 2005 08:28:11 -0000	1.17
+++ dlls/shell32/cpanelfolder.c	25 May 2005 05:37:18 -0000
@@ -473,7 +473,7 @@
 
     TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut);
 
-    return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut);
+    return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut, FALSE);
 }
 
 /**************************************************************************
Index: dlls/shell32/pidl.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/pidl.c,v
retrieving revision 1.130
diff -u -r1.130 pidl.c
--- dlls/shell32/pidl.c	10 May 2005 08:27:23 -0000	1.130
+++ dlls/shell32/pidl.c	25 May 2005 05:37:18 -0000
@@ -977,6 +977,7 @@
  *  ppidl        [O]   the newly create ItemIDList
  *  prgfInOut    [I/O] requested attributes on input and actual
  *                     attributes on return
+ *  bUnixFS      [I]   indicates unix file system
  *
  * RETURNS
  *  NO_ERROR on success or an OLE error code
@@ -991,7 +992,8 @@
  *  that creating an ItemIDList from a nonexistent path still can work.
  */
 static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile,
-                             BOOL bBindCtx, LPITEMIDLIST *ppidl, LPDWORD prgfInOut)
+                             BOOL bBindCtx, LPITEMIDLIST *ppidl, LPDWORD prgfInOut,
+                             BOOL bUnixFS)
 {
     LPSHELLFOLDER pSF = NULL;
     LPBC pBC = NULL;
@@ -1001,7 +1003,10 @@
                                              ppidl, ppidl ? *ppidl : NULL,
                                              prgfInOut, prgfInOut ? *prgfInOut : 0);
 
-    ret = SHGetDesktopFolder(&pSF);
+    if (!bUnixFS)
+        ret = SHGetDesktopFolder(&pSF);
+    else
+        ret = SHUnixFSGetDesktopFolder(&pSF);
     if (FAILED(ret))
         return ret;
 
@@ -1064,7 +1069,7 @@
         MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len);
     }
 
-    _ILParsePathW(wPath, NULL, TRUE, &pidl, NULL);
+    _ILParsePathW(wPath, NULL, TRUE, &pidl, NULL, FALSE);
 
     HeapFree(GetProcessHeap(), 0, wPath);
     TRACE("%s %p\n", debugstr_a(lpszPath), pidl);
@@ -1077,7 +1082,40 @@
 
     TRACE("%s\n", debugstr_w(lpszPath));
 
-    _ILParsePathW(lpszPath, NULL, TRUE, &pidl, NULL);
+    _ILParsePathW(lpszPath, NULL, TRUE, &pidl, NULL, FALSE);
+    TRACE("%s %p\n", debugstr_w(lpszPath), pidl);
+    return pidl;
+}
+
+LPITEMIDLIST WINAPI SHUnixFSSimpleIDListFromPathA(LPCSTR lpszPath)
+{
+    LPITEMIDLIST pidl = NULL;
+    LPWSTR wPath = NULL;
+    int len;
+
+    TRACE("%s\n", debugstr_a(lpszPath));
+
+    if (lpszPath)
+    {
+        len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0);
+        wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+        MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len);
+    }
+
+    _ILParsePathW(wPath, NULL, TRUE, &pidl, NULL, TRUE);
+
+    HeapFree(GetProcessHeap(), 0, wPath);
+    TRACE("%s %p\n", debugstr_a(lpszPath), pidl);
+    return pidl;
+}
+
+LPITEMIDLIST WINAPI SHUnixFSSimpleIDListFromPathW(LPCWSTR lpszPath)
+{
+    LPITEMIDLIST pidl = NULL;
+
+    TRACE("%s\n", debugstr_w(lpszPath));
+
+    _ILParsePathW(lpszPath, NULL, TRUE, &pidl, NULL, TRUE);
     TRACE("%s %p\n", debugstr_w(lpszPath), pidl);
     return pidl;
 }
@@ -1529,6 +1567,12 @@
 {
     TRACE("()\n");
     return _ILCreateGuid(PT_GUID, &CLSID_MyComputer);
+}
+
+LPITEMIDLIST _ILCreateUnixFolder()
+{
+    TRACE("()\n");
+    return _ILCreateGuid(PT_GUID, &CLSID_UnixFolder);
 }
 
 LPITEMIDLIST _ILCreateIExplore()
Index: dlls/shell32/pidl.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/pidl.h,v
retrieving revision 1.47
diff -u -r1.47 pidl.h
--- dlls/shell32/pidl.h	13 Apr 2005 14:39:27 -0000	1.47
+++ dlls/shell32/pidl.h	25 May 2005 05:37:18 -0000
@@ -226,6 +226,7 @@
 
 /* Other helpers */
 LPITEMIDLIST	_ILCreateMyComputer	(void);
+LPITEMIDLIST	_ILCreateUnixFolder	(void);
 LPITEMIDLIST	_ILCreateIExplore	(void);
 LPITEMIDLIST	_ILCreateControlPanel	(void);
 LPITEMIDLIST	_ILCreatePrinters	(void);
Index: dlls/shell32/shell32.spec
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32.spec,v
retrieving revision 1.96
diff -u -r1.96 shell32.spec
--- dlls/shell32/shell32.spec	23 Feb 2005 15:41:14 -0000	1.96
+++ dlls/shell32/shell32.spec	25 May 2005 05:37:18 -0000
@@ -362,6 +362,7 @@
 @ stdcall SHGetDataFromIDListA(ptr ptr long ptr long)
 @ stdcall SHGetDataFromIDListW(ptr ptr long ptr long)
 @ stdcall SHGetDesktopFolder(ptr)
+@ stdcall SHUnixFSGetDesktopFolder(ptr)
 @ stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfoA
 @ stdcall SHGetFileInfoA(ptr long ptr long long)
 @ stdcall SHGetFileInfoW(ptr long ptr long long)
Index: dlls/shell32/shell32_main.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v
retrieving revision 1.97
diff -u -r1.97 shell32_main.h
--- dlls/shell32/shell32_main.h	24 May 2005 11:45:47 -0000	1.97
+++ dlls/shell32/shell32_main.h	25 May 2005 05:37:19 -0000
@@ -88,7 +88,9 @@
 HRESULT WINAPI IShellLink_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, LPVOID * ppv);
 HRESULT WINAPI ISF_Desktop_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
+HRESULT WINAPI ISF_UnixFS_Desktop_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 HRESULT WINAPI ISF_MyComputer_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
+HRESULT WINAPI ISF_UnixFS_MyComputer_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
 HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV);
 HRESULT WINAPI IControlPanel_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv);
@@ -106,6 +108,7 @@
 
 /* FIXME: rename the functions when the shell32.dll has it's own exports namespace */
 HRESULT WINAPI  SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
+HRESULT WINAPI  SHELL32_UnixFS_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
 HRESULT WINAPI  SHELL32_DllCanUnloadNow(void);
 
 
Index: dlls/shell32/shellole.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellole.c,v
retrieving revision 1.80
diff -u -r1.80 shellole.c
--- dlls/shell32/shellole.c	24 May 2005 11:45:47 -0000	1.80
+++ dlls/shell32/shellole.c	25 May 2005 05:37:19 -0000
@@ -63,16 +63,17 @@
 struct {
 	REFIID			riid;
 	LPFNCREATEINSTANCE	lpfnCI;
+	LPFNCREATEINSTANCE	lpfnCI_UnixFS;
 } InterfaceTable[] = {
-	{&CLSID_ShellFSFolder,	&IFSFolder_Constructor},
-	{&CLSID_MyComputer,	&ISF_MyComputer_Constructor},
-	{&CLSID_ShellDesktop,	&ISF_Desktop_Constructor},
-	{&CLSID_ShellLink,	&IShellLink_Constructor},
-	{&CLSID_DragDropHelper, &IDropTargetHelper_Constructor},
-	{&CLSID_ControlPanel,	&IControlPanel_Constructor},
-	{&CLSID_AutoComplete,   &IAutoComplete_Constructor},
-	{&CLSID_UnixFolder,     &UnixFolder_Constructor},
-	{&CLSID_UnixDosFolder,  &UnixDosFolder_Constructor},
+	{&CLSID_ShellFSFolder,	&IFSFolder_Constructor,		&IFSFolder_Constructor},
+	{&CLSID_MyComputer,	&ISF_MyComputer_Constructor,	&ISF_UnixFS_MyComputer_Constructor},
+	{&CLSID_ShellDesktop,	&ISF_Desktop_Constructor,	&ISF_UnixFS_Desktop_Constructor},
+	{&CLSID_ShellLink,	&IShellLink_Constructor,	&IShellLink_Constructor},
+	{&CLSID_DragDropHelper, &IDropTargetHelper_Constructor,	&IDropTargetHelper_Constructor},
+	{&CLSID_ControlPanel,	&IControlPanel_Constructor,	&IControlPanel_Constructor},
+	{&CLSID_AutoComplete,   &IAutoComplete_Constructor,	&IAutoComplete_Constructor},
+	{&CLSID_UnixFolder,     &UnixFolder_Constructor,	&UnixFolder_Constructor},
+	{&CLSID_UnixDosFolder,  &UnixDosFolder_Constructor,	&UnixDosFolder_Constructor},
 	{NULL,NULL}
 };
 
@@ -103,12 +104,13 @@
 
 /************************************************************************/
 
-HRESULT WINAPI SHCoCreateInstance(
+HRESULT WINAPI SHCommonCoCreateInstance(
 	LPCWSTR aclsid,
 	const CLSID *clsid,
 	LPUNKNOWN pUnkOuter,
 	REFIID refiid,
-	LPVOID *ppv)
+	LPVOID *ppv,
+	BOOL bUnixFS)
 {
 	DWORD	hres;
 	IID	iid;
@@ -165,7 +167,12 @@
 
 	/* now we create an instance */
 	if (bLoadFromShell32) {
-	    if (! SUCCEEDED(SHELL32_DllGetClassObject(myclsid, &IID_IClassFactory,(LPVOID*)&pcf))) {
+            HRESULT hr;
+	    if (bUnixFS)
+	        hr = SHELL32_UnixFS_DllGetClassObject(myclsid, &IID_IClassFactory,(LPVOID*)&pcf);
+	    else
+	        hr = SHELL32_DllGetClassObject(myclsid, &IID_IClassFactory,(LPVOID*)&pcf);
+	    if (! SUCCEEDED(hr)) {
 	        ERR("LoadFromShell failed for CLSID=%s\n", shdebugstr_guid(myclsid));
 	    }
 	} else if (bLoadWithoutCOM) {
@@ -213,10 +220,30 @@
 	return hres;
 }
 
+HRESULT WINAPI SHCoCreateInstance(
+	LPCWSTR aclsid,
+	const CLSID *clsid,
+	LPUNKNOWN pUnkOuter,
+	REFIID refiid,
+	LPVOID *ppv)
+{
+    return SHCommonCoCreateInstance(aclsid, clsid, pUnkOuter, refiid, ppv, FALSE);
+}
+
+HRESULT WINAPI SHUnixFSCoCreateInstance(
+	LPCWSTR aclsid,
+	const CLSID *clsid,
+	LPUNKNOWN pUnkOuter,
+	REFIID refiid,
+	LPVOID *ppv)
+{
+    return SHCommonCoCreateInstance(aclsid, clsid, pUnkOuter, refiid, ppv, TRUE);
+}
+
 /*************************************************************************
  * DllGetClassObject   [SHELL32.@]
  */
-HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
+HRESULT WINAPI SHELL32_Common_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv, BOOL bUnixFS)
 {
 	HRESULT	hres = E_OUTOFMEMORY;
 	IClassFactory * pcf = NULL;
@@ -231,7 +258,10 @@
 	for(i=0;InterfaceTable[i].riid;i++) {
 	    if(IsEqualIID(InterfaceTable[i].riid, rclsid)) {
 	        TRACE("index[%u]\n", i);
-	        pcf = IDefClF_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL);
+		if (!bUnixFS)
+	            pcf = IDefClF_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL);
+		else
+	            pcf = IDefClF_fnConstructor(InterfaceTable[i].lpfnCI_UnixFS, NULL, NULL);
 	    }
 	}
 
@@ -247,6 +277,16 @@
 	return hres;
 }
 
+HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
+{
+    return SHELL32_Common_DllGetClassObject(rclsid, iid, ppv, FALSE);
+}
+
+HRESULT WINAPI SHELL32_UnixFS_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
+{
+    return SHELL32_Common_DllGetClassObject(rclsid, iid, ppv, TRUE);
+}
+
 /*************************************************************************
  * SHCLSIDFromString				[SHELL32.147]
  *
@@ -484,6 +524,19 @@
 	if(!psf) return E_INVALIDARG;
 	*psf = NULL;
 	hres = ISF_Desktop_Constructor(NULL, &IID_IShellFolder,(LPVOID*)psf);
+
+	TRACE("-- %p->(%p)\n",psf, *psf);
+	return hres;
+}
+
+HRESULT WINAPI SHUnixFSGetDesktopFolder(IShellFolder **psf)
+{
+	HRESULT	hres = S_OK;
+	TRACE("\n");
+
+	if(!psf) return E_INVALIDARG;
+	*psf = NULL;
+	hres = ISF_UnixFS_Desktop_Constructor(NULL, &IID_IShellFolder,(LPVOID*)psf);
 
 	TRACE("-- %p->(%p)\n",psf, *psf);
 	return hres;
Index: dlls/shell32/shfldr.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr.h,v
retrieving revision 1.9
diff -u -r1.9 shfldr.h
--- dlls/shell32/shfldr.h	2 Mar 2005 10:16:41 -0000	1.9
+++ dlls/shell32/shfldr.h	25 May 2005 05:37:19 -0000
@@ -43,7 +43,7 @@
 				       DWORD dwOutLen);
 
 HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
-			     LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut);
+			     LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut, BOOL bUnixFS);
 
 HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
 LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path);
Index: dlls/shell32/shfldr_desktop.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_desktop.c,v
retrieving revision 1.39
diff -u -r1.39 shfldr_desktop.c
--- dlls/shell32/shfldr_desktop.c	23 May 2005 16:31:42 -0000	1.39
+++ dlls/shell32/shfldr_desktop.c	25 May 2005 05:37:19 -0000
@@ -73,6 +73,7 @@
 
     UINT cfShellIDList;        /* clipboardformat for IDropTarget */
     BOOL fAcceptFmt;        /* flag for pending Drop */
+    BOOL bUnixFS;           /* is Unix file system mode */
 } IGenericSFImpl;
 
 #define _IUnknown_(This)    (IShellFolder*)&(This->lpVtbl)
@@ -186,9 +187,10 @@
         SHCLSIDFromStringW (szElement + 2, &clsid);
         pidlTemp = _ILCreateGuid (PT_GUID, &clsid);
     }
-    else if (PathGetDriveNumberW (lpszDisplayName) >= 0)
+    else if (PathGetDriveNumberW (lpszDisplayName) >= 0 || This->bUnixFS)
     {
-        /* it's a filesystem path with a drive. Let MyComputer parse it */
+        /* it's a filesystem path with a drive or Unix file path. 
+	 * Let MyComputer parse it */
         pidlTemp = _ILCreateMyComputer ();
         szNext = lpszDisplayName;
     }
@@ -347,7 +349,7 @@
 
     WideCharToMultiByte( CP_ACP, 0, This->sPathTarget, -1,
                          szPath, MAX_PATH, NULL, NULL );
-    return SHELL32_BindToChild( This->pidlRoot, szPath, pidl, riid, ppvOut );
+    return SHELL32_BindToChild( This->pidlRoot, szPath, pidl, riid, ppvOut, This->bUnixFS);
 }
 
 /**************************************************************************
@@ -836,8 +838,8 @@
 /**************************************************************************
  *    ISF_Desktop_Constructor
  */
-HRESULT WINAPI ISF_Desktop_Constructor (
-                IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
+HRESULT WINAPI ISF_Desktop_Common_Constructor (
+                IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, BOOL bUnixFS)
 {
     IGenericSFImpl *sf;
     WCHAR szMyPath[MAX_PATH];
@@ -861,6 +863,7 @@
     sf->lpVtbl = &vt_MCFldr_ShellFolder2;
     sf->pidlRoot = _ILCreateDesktop();    /* my qualified pidl */
     sf->sPathTarget = SHAlloc( (lstrlenW(szMyPath) + 1)*sizeof(WCHAR) );
+    sf->bUnixFS = bUnixFS;
     lstrcpyW( sf->sPathTarget, szMyPath );
 
     r = IUnknown_QueryInterface( _IUnknown_(sf), riid, ppv );
@@ -872,4 +875,16 @@
 
     TRACE ("--(%p)\n", sf);
     return S_OK;
+}
+
+HRESULT WINAPI ISF_Desktop_Constructor (
+                IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
+{
+    return ISF_Desktop_Common_Constructor(pUnkOuter, riid, ppv, FALSE);
+}
+
+HRESULT WINAPI ISF_UnixFS_Desktop_Constructor (
+                IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
+{
+    return ISF_Desktop_Common_Constructor(pUnkOuter, riid, ppv, TRUE);
 }
Index: dlls/shell32/shfldr_fs.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_fs.c,v
retrieving revision 1.40
diff -u -r1.40 shfldr_fs.c
--- dlls/shell32/shfldr_fs.c	23 May 2005 16:31:42 -0000	1.40
+++ dlls/shell32/shfldr_fs.c	25 May 2005 05:37:19 -0000
@@ -482,7 +482,7 @@
      shdebugstr_guid (riid), ppvOut);
 
     return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid,
-     ppvOut);
+     ppvOut, FALSE);
 }
 
 /**************************************************************************
Index: dlls/shell32/shfldr_mycomp.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_mycomp.c,v
retrieving revision 1.37
diff -u -r1.37 shfldr_mycomp.c
--- dlls/shell32/shfldr_mycomp.c	23 May 2005 16:31:42 -0000	1.37
+++ dlls/shell32/shfldr_mycomp.c	25 May 2005 05:37:19 -0000
@@ -62,6 +62,7 @@
     /* both paths are parsible from the desktop */
     LPITEMIDLIST pidlRoot;    /* absolute pidl */
     int dwAttributes;        /* attributes returned by GetAttributesOf FIXME: use it */
+    BOOL bUnixFS;           /* is Unix file system mode */
 } IGenericSFImpl;
 
 static struct IShellFolder2Vtbl vt_ShellFolder2;
@@ -97,7 +98,7 @@
 /**************************************************************************
 *    ISF_MyComputer_Constructor
 */
-HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
+HRESULT WINAPI ISF_MyComputer_Common_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv, BOOL bUnixFS)
 {
     IGenericSFImpl *sf;
 
@@ -116,6 +117,7 @@
     sf->lpVtbl = &vt_ShellFolder2;
     sf->lpVtblPersistFolder2 = &vt_PersistFolder2;
     sf->pidlRoot = _ILCreateMyComputer ();    /* my qualified pidl */
+    sf->bUnixFS = bUnixFS;
 
     if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv)))
     {
@@ -127,6 +129,16 @@
     return S_OK;
 }
 
+HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
+{
+    return ISF_MyComputer_Common_Constructor(pUnkOuter, riid, ppv, FALSE);
+}
+
+HRESULT WINAPI ISF_UnixFS_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
+{
+    return ISF_MyComputer_Common_Constructor(pUnkOuter, riid, ppv, TRUE);
+}
+
 /**************************************************************************
  *    ISF_MyComputer_fnQueryInterface
  *
@@ -222,7 +234,7 @@
         pidlTemp = _ILCreateGuid (PT_GUID, &clsid);
     }
     /* do we have an absolute path name ? */
-    else if (PathGetDriveNumberW (lpszDisplayName) >= 0 &&
+    else if (!This->bUnixFS && PathGetDriveNumberW (lpszDisplayName) >= 0 &&
               lpszDisplayName[2] == (WCHAR) '\\')
     {
         szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
@@ -230,7 +242,11 @@
         szElement[0] = toupper(szElement[0]);
         pidlTemp = _ILCreateDrive (szElement);
     }
-
+    else if (This->bUnixFS && lpszDisplayName[0] == (WCHAR)'/')
+    {
+        pidlTemp = _ILCreateUnixFolder();
+	szNext = lpszDisplayName;
+    }
     if (szNext && *szNext)
     {
         hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp,
@@ -260,7 +276,7 @@
  'o','r','e','r','\\','M','y','C','o','m','p','u','t','e','r','\\','N','a','m',
  'e','s','p','a','c','e','\0' };
 
-static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags)
+static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags, BOOL bUnixFS)
 {
     BOOL ret = TRUE;
 
@@ -269,17 +285,23 @@
     /* enumerate the folders */
     if (dwFlags & SHCONTF_FOLDERS)
     {
-        WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
-        DWORD dwDrivemap = GetLogicalDrives();
         HKEY hkey;
-
-        while (ret && wszDriveName[0]<='Z')
-        {
-            if(dwDrivemap & 0x00000001L)
-                ret = AddToEnumList(list, _ILCreateDrive(wszDriveName));
-            wszDriveName[0]++;
-            dwDrivemap = dwDrivemap >> 1;
-        }
+	if (!bUnixFS)
+	{
+            WCHAR wszDriveName[] = {'A', ':', '\\', '\0'};
+            DWORD dwDrivemap = GetLogicalDrives();
+            while (ret && wszDriveName[0]<='Z')
+            {
+                if(dwDrivemap & 0x00000001L)
+                    ret = AddToEnumList(list, _ILCreateDrive(wszDriveName));
+                wszDriveName[0]++;
+                dwDrivemap = dwDrivemap >> 1;
+            }
+	}
+	else
+	{
+	    ret = AddToEnumList(list, _ILCreateUnixFolder());
+	}
 
         TRACE("-- (%p)-> enumerate (mycomputer shell extensions)\n",list);
         if (ret && !RegOpenKeyExW(HKEY_LOCAL_MACHINE, MyComputer_NameSpaceW,
@@ -326,7 +348,7 @@
 
     *ppEnumIDList = IEnumIDList_Constructor();
     if (*ppEnumIDList)
-        CreateMyCompEnumList(*ppEnumIDList, dwFlags);
+        CreateMyCompEnumList(*ppEnumIDList, dwFlags, This->bUnixFS);
 
     TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList);
 
@@ -344,7 +366,7 @@
     TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This,
           pidl, pbcReserved, shdebugstr_guid (riid), ppvOut);
 
-    return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut);
+    return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut, This->bUnixFS);
 }
 
 /**************************************************************************
Index: dlls/shell32/shfldr_unixfs.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr_unixfs.c,v
retrieving revision 1.16
diff -u -r1.16 shfldr_unixfs.c
--- dlls/shell32/shfldr_unixfs.c	24 May 2005 11:45:47 -0000	1.16
+++ dlls/shell32/shfldr_unixfs.c	25 May 2005 05:37:19 -0000
@@ -47,6 +47,7 @@
 
 #include "shell32_main.h"
 #include "shfldr.h"
+#include "shellfolder.h"
 #include "shresdef.h"
 #include "pidl.h"
 
@@ -88,6 +89,7 @@
 typedef struct _UnixFolder {
     const IShellFolder2Vtbl  *lpIShellFolder2Vtbl;
     const IPersistFolder2Vtbl *lpIPersistFolder2Vtbl;
+    const ISFHelperVtbl       *lpISFHelperVtbl;
     ULONG m_cRef;
     CHAR *m_pszPath;
     LPITEMIDLIST m_pidlLocation;
@@ -96,6 +98,10 @@
     DWORD m_dwPathMode;
 } UnixFolder;
 
+static const IShellFolder2Vtbl UnixFolder_IShellFolder2_Vtbl;
+static const IPersistFolder2Vtbl UnixFolder_IPersistFolder2_Vtbl;
+static const ISFHelperVtbl shvt;
+
 /******************************************************************************
  * UNIXFS_is_pidl_of_type [INTERNAL]
  *
@@ -692,6 +698,9 @@
                IsEqualIID(&IID_IPersist, riid)) 
     {
         *ppv = &This->lpIPersistFolder2Vtbl;
+    } else if (IsEqualIID(&IID_ISFHelper, riid))
+    {
+        *ppv = &This->lpISFHelperVtbl;
     } else {
         *ppv = NULL;
         return E_NOINTERFACE;
@@ -891,8 +900,8 @@
     for (i=0; i<cidl; i++) {
         LPPIDLDATA pData = _ILGetDataPointer(apidl[i]);
         if (!pData) continue;
-        if (pData->type == PT_FOLDER) flags &= (SFGAO_FILESYSTEM|SFGAO_FILESYSANCESTOR|SFGAO_FOLDER|SFGAO_HASSUBFOLDER);
-        if (pData->type == PT_VALUE) flags &= SFGAO_FILESYSTEM;
+        if (pData->type == PT_FOLDER) flags &= (SFGAO_FILESYSTEM|SFGAO_FILESYSANCESTOR|SFGAO_FOLDER|SFGAO_HASSUBFOLDER|SFGAO_CANRENAME);
+        if (pData->type == PT_VALUE) flags &= SFGAO_FILESYSTEM|SFGAO_CANRENAME;
     }
     
     *rgfInOut = *rgfInOut & flags;
@@ -979,11 +988,46 @@
     return hr;
 }
 
-static HRESULT WINAPI UnixFolder_IShellFolder2_SetNameOf(IShellFolder2* This, HWND hwnd, 
+static HRESULT WINAPI UnixFolder_IShellFolder2_SetNameOf(IShellFolder2* iface, HWND hwnd, 
     LPCITEMIDLIST pidl, LPCOLESTR lpszName, SHGDNF uFlags, LPITEMIDLIST* ppidlOut)
 {
-    TRACE("stub\n");
-    return E_NOTIMPL;
+    UnixFolder *This = ADJUST_THIS(UnixFolder, IShellFolder2, iface);
+    char szSrc[MAX_PATH], szDest[MAX_PATH], temp[MAX_PATH];
+    char* ptr;
+    BOOL bIsFolder = _ILIsFolder (ILFindLastID (pidl));
+    TRACE ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", iface, hwnd, pidl,
+     debugstr_w (lpszName), uFlags, ppidlOut);
+
+    /* build source path */
+    strcpy(szSrc, This->m_pszPath);
+    ptr = szSrc + lstrlenA(szSrc);
+    if (ptr)
+        _ILSimpleGetText(pidl, ptr, MAX_PATH - (ptr - szSrc));
+
+    WideCharToMultiByte(CP_ACP, 0, lpszName, -1, temp, MAX_PATH, NULL, NULL);
+    /* build destination path */
+    if (uFlags == SHGDN_NORMAL || uFlags & SHGDN_INFOLDER) {
+        strcpy(szDest, This->m_pszPath);
+        ptr = szDest + lstrlenA(szDest);
+        if (ptr)
+            lstrcpynA(ptr, temp, MAX_PATH - (ptr - szDest));
+    } else
+        lstrcpynA(szDest, temp, MAX_PATH);
+
+    TRACE ("src=%s dest=%s\n", szSrc, szDest);
+
+    if (!rename(szSrc, szDest)) {
+        HRESULT hr = S_OK;
+
+        if (ppidlOut)
+            hr = _ILCreateFromPathA(szDest, ppidlOut);
+
+        SHChangeNotify (bIsFolder ? SHCNE_RENAMEFOLDER : SHCNE_RENAMEITEM,
+         SHCNF_PATHA, szSrc, szDest);
+
+        return hr;
+    }
+    return E_FAIL;
 }
 
 static HRESULT WINAPI UnixFolder_IShellFolder2_EnumSearches(IShellFolder2* iface, 
@@ -1209,6 +1253,7 @@
     if(pUnixFolder) {
         pUnixFolder->lpIShellFolder2Vtbl = &UnixFolder_IShellFolder2_Vtbl;
         pUnixFolder->lpIPersistFolder2Vtbl = &UnixFolder_IPersistFolder2_Vtbl;
+        pUnixFolder->lpISFHelperVtbl = &shvt;
         pUnixFolder->m_cRef = 0;
         pUnixFolder->m_pszPath = NULL;
         pUnixFolder->m_apidlSubDirs = NULL;
@@ -1391,3 +1436,120 @@
     
     return (IUnknown*)iterator;
 }
+
+static HRESULT WINAPI ISFHelper_fnQueryInterface (ISFHelper* iface, REFIID riid, void** ppvObject)
+{
+    return UnixFolder_IShellFolder2_QueryInterface(
+                (IShellFolder2*)ADJUST_THIS(UnixFolder, ISFHelper, iface), riid, ppvObject);
+}
+
+static ULONG WINAPI ISFHelper_fnAddRef (ISFHelper * iface)
+{
+    return UnixFolder_IShellFolder2_AddRef(
+                (IShellFolder2*)ADJUST_THIS(UnixFolder, ISFHelper, iface));
+}
+
+static ULONG WINAPI ISFHelper_fnRelease (ISFHelper * iface)
+{
+    return UnixFolder_IShellFolder2_Release(
+                (IShellFolder2*)ADJUST_THIS(UnixFolder, ISFHelper, iface));
+}
+
+static HRESULT WINAPI ISFHelper_fnGetUniqueName (ISFHelper * iface, LPSTR lpName, UINT uLen)
+{
+    IShellFolder2 *isf = (IShellFolder2*)ADJUST_THIS(UnixFolder, ISFHelper, iface);
+    IEnumIDList *penum;
+    HRESULT hr;
+    char szText[MAX_PATH];
+    char *szNewFolder = "NewFolder";
+
+    if (uLen < strlen (szNewFolder) + 4)
+        return E_POINTER;
+
+    strcpy (lpName, szNewFolder);
+
+    hr = UnixFolder_IShellFolder2_EnumObjects (isf, 0,
+     SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum);
+    if (penum) {
+        LPITEMIDLIST pidl;
+        DWORD dwFetched;
+        int i = 1;
+
+next:
+        IEnumIDList_Reset (penum);
+        while (S_OK == IEnumIDList_Next (penum, 1, &pidl, &dwFetched) &&
+         dwFetched) {
+            _ILSimpleGetText (pidl, szText, MAX_PATH);
+            if (0 == strcasecmp (szText, lpName)) {
+                sprintf (lpName, "%s %d", szNewFolder, i++);
+                if (i > 99) {
+                    hr = E_FAIL;
+                    break;
+                }
+                goto next;
+            }
+        }
+
+        IEnumIDList_Release (penum);
+    }
+    return hr;
+}
+
+static HRESULT WINAPI ISFHelper_fnAddFolder (ISFHelper * iface, HWND hwnd, LPCSTR lpName,
+                       LPITEMIDLIST * ppidlOut)
+{
+    UnixFolder *This = ADJUST_THIS(UnixFolder, ISFHelper, iface);
+    char lpstrNewDir[MAX_PATH];
+    DWORD bRes;
+    HRESULT hres = E_FAIL;
+
+    TRACE ("(%p)(%s %p)\n", This, lpName, ppidlOut);
+    strcpy (lpstrNewDir, This->m_pszPath);
+    strcat(lpstrNewDir, lpName);
+    bRes = mkdir (lpstrNewDir, 755);
+    if (!bRes) {
+        SHUnixFSChangeNotify (SHCNE_MKDIR, SHCNF_PATHA, lpstrNewDir, NULL);
+
+        hres = S_OK;
+
+        if (ppidlOut)
+                hres = _ILCreateFromPathA(lpstrNewDir, ppidlOut);
+    } else {
+        char lpstrText[128 + MAX_PATH];
+        char lpstrTempText[128];
+        char lpstrCaption[256];
+
+        /* Cannot Create folder because of permissions */
+        LoadStringA (shell32_hInstance, IDS_CREATEFOLDER_DENIED, lpstrTempText,
+         sizeof (lpstrTempText));
+        LoadStringA (shell32_hInstance, IDS_CREATEFOLDER_CAPTION, lpstrCaption,
+         sizeof (lpstrCaption));
+        sprintf (lpstrText, lpstrTempText, lpstrNewDir);
+        MessageBoxA (hwnd, lpstrText, lpstrCaption, MB_OK | MB_ICONEXCLAMATION);
+    }
+    return hres;
+}
+
+static HRESULT WINAPI ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl)
+{
+    TRACE("stub\n");
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl,
+                       LPCITEMIDLIST * apidl)
+{
+    TRACE("stub\n");
+    return E_NOTIMPL;
+}
+
+static const ISFHelperVtbl shvt =
+{
+    ISFHelper_fnQueryInterface,
+    ISFHelper_fnAddRef,
+    ISFHelper_fnRelease,
+    ISFHelper_fnGetUniqueName,
+    ISFHelper_fnAddFolder,
+    ISFHelper_fnDeleteItems,
+    ISFHelper_fnCopyItems
+};
Index: dlls/shell32/shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v
retrieving revision 1.99
diff -u -r1.99 shlfolder.c
--- dlls/shell32/shlfolder.c	18 May 2005 09:43:39 -0000	1.99
+++ dlls/shell32/shlfolder.c	25 May 2005 05:37:19 -0000
@@ -186,13 +186,18 @@
  *   In this case the absolute path is build from pidlChild (eg. C:)
  */
 HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot,	LPCSTR pathRoot,
-    LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut)
+    LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut, BOOL bUnixFS)
 {
     HRESULT hr;
 
     TRACE ("%p %s %p\n", pidlRoot, pathRoot, pidlChild);
-
-    if (SUCCEEDED ((hr = SHCoCreateInstance (NULL, clsid, NULL, riid, ppvOut)))) {
+    
+    if (!bUnixFS)
+        hr = SHCoCreateInstance (NULL, clsid, NULL, riid, ppvOut);
+    else
+        hr = SHUnixFSCoCreateInstance(NULL, clsid, NULL, riid, ppvOut);
+    
+    if (SUCCEEDED (hr)) {
 	LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild);
 	IPersistFolder *pPF;
 	IPersistFolder3 *ppf;
@@ -245,7 +250,7 @@
  * Creates a shell folder by binding to a root pidl.
  */
 HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
-			     LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut)
+			     LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut, BOOL bUnixFS)
 {
     GUID const *clsid;
     IShellFolder *pSF;
@@ -261,7 +266,7 @@
 
     if ((clsid = _ILGetGUIDPointer (pidlChild))) {
 	/* virtual folder */
-	hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, clsid, &IID_IShellFolder, (LPVOID *) & pSF);
+	hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, clsid, &IID_IShellFolder, (LPVOID *) & pSF, bUnixFS);
     } else {
         /* file system folder */
         CLSID clsidFolder = CLSID_ShellFSFolder;
@@ -274,7 +279,7 @@
             CLSIDFromString (wszCLSIDValue, &clsidFolder);
         ILFree (pidlAbsolute);
         hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild,
-            &clsidFolder, &IID_IShellFolder, (LPVOID *)&pSF);
+            &clsidFolder, &IID_IShellFolder, (LPVOID *)&pSF, bUnixFS);
     }
     ILFree (pidlChild);
 
Index: dlls/shell32/undocshell.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/undocshell.h,v
retrieving revision 1.28
diff -u -r1.28 undocshell.h
--- dlls/shell32/undocshell.h	13 Dec 2004 21:19:01 -0000	1.28
+++ dlls/shell32/undocshell.h	25 May 2005 05:37:19 -0000
@@ -54,6 +54,8 @@
 
 LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
+LPITEMIDLIST WINAPI SHUnixFSSimpleIDListFromPathA (LPCSTR lpszPath);
+LPITEMIDLIST WINAPI SHUnixFSSimpleIDListFromPathW (LPCWSTR lpszPath);
 
 HRESULT WINAPI SHILCreateFromPathA (
 	LPCSTR path,
Index: dlls/shlwapi/path.c
===================================================================
RCS file: /home/wine/wine/dlls/shlwapi/path.c,v
retrieving revision 1.53
diff -u -r1.53 path.c
--- dlls/shlwapi/path.c	18 Apr 2005 15:36:20 -0000	1.53
+++ dlls/shlwapi/path.c	25 May 2005 05:37:20 -0000
@@ -37,6 +37,7 @@
 #include "shlwapi.h"
 #include "wine/debug.h"
 
+#define IS_SEPARATOR(ch)  ((ch) == '\\' || (ch) == '/')
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
 /* Get a function pointer from a DLL handle */
@@ -1491,7 +1492,7 @@
 
   if (!lpszPath || !*lpszPath || IsDBCSLeadByte(*lpszPath))
     return TRUE;
-  if (*lpszPath == '\\' || (*lpszPath && lpszPath[1] == ':'))
+  else if (IS_SEPARATOR(*lpszPath) || (*lpszPath && lpszPath[1] == ':'))
     return FALSE;
   return TRUE;
 }
@@ -1507,7 +1508,8 @@
 
   if (!lpszPath || !*lpszPath)
     return TRUE;
-  if (*lpszPath == '\\' || (*lpszPath && lpszPath[1] == ':'))
+  
+  else if (IS_SEPARATOR(*lpszPath) || (*lpszPath && lpszPath[1] == ':'))
     return FALSE;
   return TRUE;
 }
@@ -2377,7 +2379,7 @@
   }
 
   /* Copy path root */
-  if (*lpszSrc == '\\')
+  if (IS_SEPARATOR(*lpszSrc))
   {
     *lpszDst++ = *lpszSrc++;
   }
@@ -2395,11 +2397,11 @@
   {
     if (*lpszSrc == '.')
     {
-      if (lpszSrc[1] == '\\' && (lpszSrc == lpszPath || lpszSrc[-1] == '\\' || lpszSrc[-1] == ':'))
+      if (IS_SEPARATOR(lpszSrc[1]) && (lpszSrc == lpszPath || IS_SEPARATOR(lpszSrc[-1]) || lpszSrc[-1] == ':'))
       {
         lpszSrc += 2; /* Skip .\ */
       }
-      else if (lpszSrc[1] == '.' && (lpszDst == lpszBuf || lpszDst[-1] == '\\'))
+      else if (lpszSrc[1] == '.' && (lpszDst == lpszBuf || IS_SEPARATOR(lpszDst[-1])))
       {
         /* \.. backs up a directory, over the root if it has no \ following X:.
          * .. is ignored if it would remove a UNC server name or inital \\
@@ -2407,15 +2409,15 @@
         if (lpszDst != lpszBuf)
         {
           *lpszDst = '\0'; /* Allow PathIsUNCServerShareA test on lpszBuf */
-          if (lpszDst > lpszBuf+1 && lpszDst[-1] == '\\' &&
-             (lpszDst[-2] != '\\' || lpszDst > lpszBuf+2))
+          if (lpszDst > lpszBuf+1 && IS_SEPARATOR(lpszDst[-1]) &&
+             (!IS_SEPARATOR(lpszDst[-2]) || lpszDst > lpszBuf+2))
           {
             if (lpszDst[-2] == ':' && (lpszDst > lpszBuf+3 || lpszDst[-3] == ':'))
             {
               lpszDst -= 2;
-              while (lpszDst > lpszBuf && *lpszDst != '\\')
+              while (lpszDst > lpszBuf && !IS_SEPARATOR(*lpszDst))
                 lpszDst--;
-              if (*lpszDst == '\\')
+              if (IS_SEPARATOR(*lpszDst))
                 lpszDst++; /* Reset to last '\' */
               else
                 lpszDst = lpszBuf; /* Start path again from new root */
@@ -2423,7 +2425,7 @@
             else if (lpszDst[-2] != ':' && !PathIsUNCServerShareW(lpszBuf))
               lpszDst -= 2;
           }
-          while (lpszDst > lpszBuf && *lpszDst != '\\')
+          while (lpszDst > lpszBuf && !IS_SEPARATOR(*lpszDst))
             lpszDst--;
           if (lpszDst == lpszBuf)
           {
Index: include/shlobj.h
===================================================================
RCS file: /home/wine/wine/include/shlobj.h,v
retrieving revision 1.102
diff -u -r1.102 shlobj.h
--- include/shlobj.h	19 May 2005 11:14:14 -0000	1.102
+++ include/shlobj.h	25 May 2005 05:37:20 -0000
@@ -36,6 +36,7 @@
 
 LPVOID       WINAPI SHAlloc(ULONG);
 HRESULT      WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,IUnknown*,REFIID,LPVOID*);
+HRESULT      WINAPI SHUnixFSCoCreateInstance(LPCWSTR,const CLSID*,IUnknown*,REFIID,LPVOID*);
 DWORD        WINAPI SHCLSIDFromStringA(LPCSTR,CLSID*);
 DWORD        WINAPI SHCLSIDFromStringW(LPCWSTR,CLSID*);
 #define             SHCLSIDFromString WINELIB_NAME_AW(SHCLSIDFromString)
@@ -895,6 +896,7 @@
 #define SHCNF_PRINTER           WINELIB_NAME_AW(SHCNF_PRINTER)
 
 void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
+void WINAPI SHUnixFSChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
 
 typedef enum {
     SLDF_HAS_ID_LIST = 0x00000001,
@@ -1069,6 +1071,7 @@
  * SHGetDesktopFolder API
  */
 HRESULT WINAPI SHGetDesktopFolder(IShellFolder * *);
+HRESULT WINAPI SHUnixFSGetDesktopFolder(IShellFolder * *);
 
 /****************************************************************************
  * SHBindToParent API


More information about the wine-patches mailing list