Modify

Opened 12 years ago

Closed 11 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 Changed 12 years ago by mvg

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

comment:2 Changed 12 years ago by mvg

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 Changed 12 years ago by mvg

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 Changed 12 years ago by trancexx

What code do I need to run?

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

comment:5 Changed 12 years ago by mvg

?
"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 Changed 11 years ago by Jon

  • Resolution set to Rejected
  • Status changed from new to closed

comment:7 Changed 11 years ago by Jpm

  • Resolution Rejected deleted
  • Status changed from closed to reopened

comment:8 Changed 11 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from reopened to closed

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.