Changeset 5618 for trunk/src/shell32/shlfolder.c
- Timestamp:
- Apr 28, 2001, 3:33:49 PM (25 years ago)
- File:
-
- 1 edited
-
trunk/src/shell32/shlfolder.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shlfolder.c
r4121 r5618 1 /* $Id: shlfolder.c,v 1.1 2000-08-30 13:52:57 sandervl Exp $ */2 1 /* 3 2 * Shell Folder stuff … … 10 9 */ 11 10 #ifdef __WIN32OS2__ 12 #define ICOM_CINTERFACE 113 # include <odin.h>11 #define WINE_LARGE_INTEGER 12 #define snprintf(a,b,c,d) sprintf(a,c,d) 14 13 #endif 15 16 14 #include <stdlib.h> 17 15 #include <string.h> … … 20 18 #include "debugtools.h" 21 19 #include "winerror.h" 20 #include "winbase.h" 22 21 23 22 #include "oleidl.h" … … 32 31 #include "shresdef.h" 33 32 #include "shlwapi.h" 34 35 #define INITGUID36 #include "initguid.h"37 33 #include "shellfolder.h" 38 34 39 40 DEFAULT_DEBUG_CHANNEL(shell) 35 DEFAULT_DEBUG_CHANNEL(shell); 41 36 42 37 … … 347 342 348 343 /************************************************************************** 349 * we need a sep erate IUnknown to handle aggregation344 * we need a separate IUnknown to handle aggregation 350 345 * (inner IUnknown) 351 346 */ … … 616 611 * 617 612 * NOTES 618 * every folder tr ys to parse only it's own (the leftmost) pidl and creates a613 * every folder tries to parse only its own (the leftmost) pidl and creates a 619 614 * subfolder to evaluate the remaining parts 620 615 * now we can parse into namespaces implemented by shell extensions … … 658 653 659 654 /* build the full pathname to the element */ 660 lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);655 WideCharToMultiByte( CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL ); 661 656 strcpy(szPath, This->sMyPath); 662 657 PathAddBackslashA(szPath); … … 691 686 } 692 687 693 *ppidl = pidlTemp; 688 if (!hr) 689 *ppidl = pidlTemp; 690 else 691 *ppidl = NULL; 694 692 695 693 TRACE("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl? *ppidl:0, hr); … … 1188 1186 PathAddBackslashA(szDest); 1189 1187 len = strlen (szDest); 1190 lstrcpynWtoA(szDest+len, lpName, MAX_PATH-len);1191 1188 WideCharToMultiByte( CP_ACP, 0, lpName, -1, szDest+len, MAX_PATH-len, NULL, NULL ); 1189 szDest[MAX_PATH-1] = 0; 1192 1190 TRACE("src=%s dest=%s\n", szSrc, szDest); 1193 1191 if ( MoveFileA(szSrc, szDest) ) … … 1498 1496 int i; 1499 1497 char szPath[MAX_PATH]; 1498 BOOL bConfirm = TRUE; 1500 1499 1501 1500 TRACE("(%p)(%u %p)\n", This, cidl, apidl); 1502 1501 1502 /* deleting multiple items so give a slightly different warning */ 1503 if(cidl != 1) 1504 { 1505 char tmp[8]; 1506 snprintf(tmp, sizeof(tmp), "%d", cidl); 1507 if(!SHELL_WarnItemDelete(ASK_DELETE_MULTIPLE_ITEM, tmp)) 1508 return E_FAIL; 1509 bConfirm = FALSE; 1510 } 1511 1503 1512 for(i=0; i< cidl; i++) 1504 1513 { … … 1510 1519 { 1511 1520 LPITEMIDLIST pidl; 1512 1513 MESSAGE("delete %s\n", szPath); 1514 if (! SHELL_DeleteDirectoryA(szPath, TRUE)) return E_FAIL; 1521 TRACE("delete %s\n", szPath); 1522 if (! SHELL_DeleteDirectoryA(szPath, bConfirm)) 1523 { 1524 TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm); 1525 return E_FAIL; 1526 } 1515 1527 pidl = ILCombine(This->absPidl, apidl[i]); 1516 1528 SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL); … … 1521 1533 LPITEMIDLIST pidl; 1522 1534 1523 MESSAGE("delete %s\n", szPath); 1524 if (! DeleteFileA(szPath)) return E_FAIL; 1535 TRACE("delete %s\n", szPath); 1536 if (! SHELL_DeleteFileA(szPath, bConfirm)) 1537 { 1538 TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm); 1539 return E_FAIL; 1540 } 1525 1541 pidl = ILCombine(This->absPidl, apidl[i]); 1526 1542 SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL); … … 2133 2149 { 2134 2150 szNext = GetNextElementW(lpszDisplayName, szElement, MAX_PATH); 2135 lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);2151 WideCharToMultiByte( CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL ); 2136 2152 pidlTemp = _ILCreateDrive(szTempA); 2137 2153 … … 2498 2514 _ILSimpleGetText(pidl, szPath, MAX_PATH); 2499 2515 GetDiskFreeSpaceExA(szPath, NULL, &ulBytes, NULL); 2500 #ifdef __WIN32OS2__2501 StrFormatByteSizeA(ulBytes.LowPart, psd->str.u.cStr, MAX_PATH);2502 #else2503 2516 StrFormatByteSizeA(ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH); 2504 #endif2505 2517 } 2506 2518 break; … … 2510 2522 _ILSimpleGetText(pidl, szPath, MAX_PATH); 2511 2523 GetDiskFreeSpaceExA(szPath, &ulBytes, NULL, NULL); 2512 #ifdef __WIN32OS2__2513 StrFormatByteSizeA(ulBytes.LowPart, psd->str.u.cStr, MAX_PATH);2514 #else2515 2524 StrFormatByteSizeA(ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH); 2516 #endif2517 2525 } 2518 2526 break;
Note:
See TracChangeset
for help on using the changeset viewer.
