http://bugs.winehq.org/show_bug.cgi?id=21872
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Webload fails to install |Webload fails to install |dll properly (Version.dll |dll properly (Version.dll |VerInstallFile 8.3 short |VerInstallFile with |vs. existing long file |VIFF_DONTDELETEOLD) |name) |
--- Comment #10 from Anastasius Focht focht@gmx.net 2012-01-30 18:09:54 CST --- Hello again,
well it's late so ... ;-)
VerInstallFile() flags -> VIFF_DONTDELETEOLD
MSDN says for VIFF_DONTDELETEOLD: "Installs the file without deleting the previously installed file, if the previously installed file is not in the destination directory."
http://source.winehq.org/git/wine.git/blob/6a8ba3616c7eebd2ea42deba2ce087d58...
--- snip --- 1334 DWORD WINAPI VerInstallFileA( 1335 DWORD flags,LPCSTR srcfilename,LPCSTR destfilename,LPCSTR srcdir, 1336 LPCSTR destdir,LPCSTR curdir,LPSTR tmpfile,PUINT tmpfilelen ) 1337 { ... 1424 if (!(flags & VIFF_FORCEINSTALL)) { 1425 VS_FIXEDFILEINFO *destvffi,*tmpvffi; 1426 buf1 = _fetch_versioninfo(destfn,&destvffi); ... 1455 HeapFree(GetProcessHeap(), 0, buf2); 1456 } else 1457 xret=VIF_MISMATCH|VIF_SRCOLD; 1458 HeapFree(GetProcessHeap(), 0, buf1); 1459 } 1460 } ... 1470 } else { 1471 if (INVALID_FILE_ATTRIBUTES!=GetFileAttributesA(destfn)) 1472 if (!DeleteFileA(destfn)) { 1473 xret|=_error2vif(GetLastError())|VIF_CANNOTDELETE; 1474 DeleteFileA(tmpfn); 1475 LZClose(hfsrc); 1476 return xret; 1477 } 1478 if ((!(flags & VIFF_DONTDELETEOLD)) && 1479 curdir && 1480 *curdir && 1481 lstrcmpiA(curdir,pdest) 1482 ) { 1483 char curfn[260]; 1484 1485 sprintf(curfn,"%s\%s",curdir,destfilename); 1486 if (INVALID_FILE_ATTRIBUTES != GetFileAttributesA(curfn)) { 1487 /* FIXME: check if in use ... if it is, VIF_CANNOTDELETECUR */ 1488 if (!DeleteFileA(curfn)) 1489 xret|=_error2vif(GetLastError())|VIF_CANNOTDELETECUR; 1490 } 1491 } 1492 if (!MoveFileA(tmpfn,destfn)) { 1493 xret|=_error2vif(GetLastError())|VIF_CANNOTRENAME; 1494 DeleteFileA(tmpfn); 1495 } 1496 } 1497 LZClose(hfsrc); 1498 return xret; 1499 } --- snip ---
Existing file prior calling VerInstallFileA(): "RWUXThemeS60.dll"
Winedbg session:
--- snip --- Wine-dbg>bt Backtrace: =>0 0x7effc5ef VerInstallFileA+0x6c3(flags=0x2, srcfilename="~GLH0718.TMP", destfilename="RWUX~OPY.DLL", srcdir="C:\Program Files\RadView\WebLOAD\bin", destdir="C:\PROG~FBU\RadView\WebLOAD\bin", curdir="C:\PROG~FBU\RadView\WebLOAD\bin", tmpfile="", tmpfilelen=0x33d4c4) [/home/focht/projects/wine/wine-git/dlls/version/version.c:1472] in version (0x0033d168) 1 0x10014fd3 in glc3cb9.tmp (+0x14fd2) (0x0033d49c) 2 0x10006dbd in glc3cb9.tmp (+0x6dbc) (0x0033e6a4) 3 0x10005abb in glc3cb9.tmp (+0x5aba) (0x0033e7ac) 4 0x10004314 in glc3cb9.tmp (+0x4313) (0x0033f4c4) ... Wine-dbg>n 1471 if (INVALID_FILE_ATTRIBUTES!=GetFileAttributesA(destfn)) Wine-dbg>n 1472 if (!DeleteFileA(destfn)) { --- snip ---
The source and destination file are binary identical. Maybe VerInstallFile() isn't supposed to delete the destination in this case? Another method might be overwriting the destination file (instead of delete/move), keeping the original long file name.
Regards