Modify

Opened 14 years ago

Closed 13 years ago

#2190 closed Bug (No Bug)

DirMove. (false success)

Reported by: mvg Owned by:
Milestone: Component: AutoIt
Version: 3.3.9.4 Severity: None
Keywords: DirMove Cc:

Description

Looks like a bug to me. (if not ... ?)

DirRemove('testFolder1', 1) ;; pre-cleanup.

DirCreate('testFolder1\2') ;; setup
FileWrite('testFolder1\2\21.file', '21.file') ;; setup (not needed)

$iResult = DirMove('testFolder1/2', 'testFolder1/2/3/4', 0) ;; test (same result for flag 0 or 1)
ConsoleWrite('$iResult = ' & $iResult & @CRLF) ;; 1=Succes, But nothing was moved or created.)

Attachments (0)

Change History (8)

comment:1 by mvg, 14 years ago

Environment(Language:0413 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86)

comment:2 by mvg, 14 years ago

Erm. Just ignore the stupid mixed slash use. (Although in this case its not making a difference.)

Corrected version, same results.

DirRemove('testFolder1', 1) ;; pre-cleanup.

DirCreate('testFolder1\2') ;; setup
FileWrite('testFolder1\2\21.file', '21.file') ;; setup (not needed)

$iResult = DirMove('testFolder1\2', 'testFolder1\2\3\4', 0) ;; test (same result for flag 0 or 1)
ConsoleWrite('$iResult = ' & $iResult & @CRLF) ;; 1=Succes, But nothing was moved or created.)

$iResult = DirMove('testFolder1\2', 'testFolder1\2\3\4', 1) ;; test (same result for flag 0 or 1)
ConsoleWrite('$iResult = ' & $iResult & @CRLF) ;; 1=Succes, But nothing was moved or created.)

... +3, and counting ...

comment:3 by mvg, 14 years ago

Bonus: (as I cant count)

DirCreate('testFolder1\2') ;; setup
;; or
DirCreate('testFolder1\2\3\4') ;; flag=0 fails now correctly, flag=1 still fails successfully.

comment:4 by trancexx, 14 years ago

What code do I need to run?

Show exact code that fails for you. Simple reproducer if you don't mind.

comment:5 by mvg, 14 years ago

?
"More simpler" in this case translates to shorter* to me.
*) less code and less comments.

DirCreate('testFolder1\2')
FileWrite('testFolder1\2\21.file', '21.file')
ConsoleWrite(DirMove('testFolder1\2', 'testFolder1\2\3\4', 0) & @CRLF) ;; returns 1, but nothing was done.
ConsoleWrite(DirMove('testFolder1\2', 'testFolder1\2\3\4', 1) & @CRLF) ;; returns 1, but nothing was done.

comment:6 by Jon, 13 years ago

Resolution: Rejected
Status: newclosed

comment:7 by J-Paul Mesnage, 13 years ago

Resolution: Rejected
Status: closedreopened

comment:8 by J-Paul Mesnage, 13 years ago

Resolution: No Bug
Status: reopenedclosed

The proposed scripts return 0 which is correct as the move cannot be performed to move to a subdir destroying the source dir

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.