Menu

#163 CopyFiles return value not working on NT4 Sp6

2.0 Beta Series
closed-fixed
General (291)
5
2007-04-12
2003-07-21
Anonymous
No

The following code correctly reports the error on Win2k,
but always returns CopyOK on NT4. Have tried 2.0b3
and 2.0b4CVS (21/07/2003)

!include "MUI.nsh"
!define MUI_PRODUCT "Modern UI Test"
!define MUI_VERSION "1.65"
OutFile "Basic.exe"

!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

Section "modern.exe" SecCopyUI
ClearErrors
CopyFiles "C:\1.txt" "D:\"
IfErrors +1 +3
MessageBox
MB_OK|MB_ICONSTOP|MB_TOPMOST "Copy Failed"
Goto +2
MessageBox
MB_OK|MB_ICONSTOP|MB_TOPMOST "Copy OK"
SectionEnd

Discussion

  • Mark Gillespie

    Mark Gillespie - 2003-07-21

    Logged In: YES
    user_id=246574

    Followup. I have logged on this time, so you now know who
    logged this bug!

     
  • Ramon

    Ramon - 2004-09-15
    • assigned_to: nobody --> ramon18
     
  • Amir Szekely

    Amir Szekely - 2005-08-26

    Logged In: YES
    user_id=584402

    Another report: #1270907.

     
  • Amir Szekely

    Amir Szekely - 2005-08-26
    • assigned_to: ramon18 --> nobody
     
  • Amir Szekely

    Amir Szekely - 2007-04-12
    • assigned_to: nobody --> kichik
    • status: open --> closed-fixed
     
  • Amir Szekely

    Amir Szekely - 2007-04-12

    Logged In: YES
    user_id=584402
    Originator: NO

    Finally fixed with a simple check for the existence of the source file before calling SHFileOperation. I always wanted to solve this with a private implementation of SHFileOperation which can be shared with Delete, RMDir and maybe even CreateDirectory and File. But it's way past due time to solve this issue.

     

Log in to post a comment.