Changeset 1664 for trunk/dll/worker.c
- Timestamp:
- Aug 5, 2012, 2:11:07 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/worker.c
r1646 r1664 49 49 by temp file creation failures. 50 50 12 Nov 11 GKY Fixed extract failure caused by spaces in the arc file name. 51 04 Aug 12 GKY Changes to use Unlock to unlock files if Unlock.exe is in path both from menu/toolbar and as part of 52 copy, move and delete operations 53 04 Aug 12 GKY Changes to allow copy and move over readonly files with a warning dialog; also added a warning dialog 54 for delete of readonly files 51 55 52 56 ***********************************************************************/ … … 118 122 #pragma data_seg(GLOBAL2) 119 123 FILE *LogFileHandle; 124 BOOL fUnlock; 120 125 121 126 #pragma data_seg(DATA2) … … 222 227 UINT x; 223 228 BOOL dontask = FALSE, wildcarding = FALSE, overold = 224 FALSE, overnew = FALSE, usedtarget;229 FALSE, overnew = FALSE, noreadonlywarn = FALSE, usedtarget; 225 230 226 231 WinCancelShutdown(hmq2, TRUE); … … 455 460 } 456 461 } 457 break; 462 break; 463 464 case IDM_UNLOCKFILE: 465 runemf2(SEPARATE | KEEP | WINDOWED//| INVISIBLE | BACKGROUND 466 | WAIT, 467 HWND_DESKTOP, pszSrcFile, __LINE__, 468 NULL, NULL, "%s %s", PCSZ_UNLOCKEXE, wk->li->list[x]); 469 break; 458 470 459 471 case IDM_VIEWARCHIVE: … … 707 719 // Target OK so far 708 720 CHAR newname[CCHMAXPATH]; 709 APIRET rc; 721 APIRET rc; 722 INT ret; 710 723 FILESTATUS4L fs4; 711 724 BOOL isnewer; … … 793 806 overold = TRUE; 794 807 if (mv.overnew) 795 overnew = TRUE; 808 overnew = TRUE; 809 if (mv.noreadonlywarn) 810 noreadonlywarn = TRUE; 796 811 if (wildcarding || wk->li->type == IDM_RENAME) { 797 812 p = strrchr(mv.target, '\\'); … … 856 871 priority_idle(); 857 872 858 rc = docopyf(type, wk->li->list[x], newname); 873 rc = docopyf(type, wk->li->list[x], newname); 874 if (rc == ERROR_ACCESS_DENIED || rc == ERROR_SHARING_VIOLATION) { 875 if (rc == ERROR_ACCESS_DENIED && noreadonlywarn) 876 rc = -1; 877 ret = make_deleteable(newname, rc); 878 rc = docopyf(type, wk->li->list[x], newname); 879 } 880 if (!ret && (rc == ERROR_ACCESS_DENIED || (rc == ERROR_SHARING_VIOLATION && fUnlock))) 881 rc = NO_ERROR; 882 //if (fTurnOffReadOnly) 883 // make_deleteable(newname, rc); 859 884 if (fResetVerify) { 860 885 DosSetVerify(fVerify); 861 886 fResetVerify = FALSE; 862 887 } 863 888 priority_normal(); 864 889 if (rc) { 865 890 if ((rc == ERROR_DISK_FULL || … … 1715 1740 if (error) { 1716 1741 DosError(FERR_DISABLEHARDERR); 1717 make_deleteable(wk->li->list[x] );1742 make_deleteable(wk->li->list[x], error); 1718 1743 if (wk->li->type == IDM_DELETE){ 1719 1744 hObjectdest = WinQueryObject("<XWP_TRASHCAN>");
Note:
See TracChangeset
for help on using the changeset viewer.