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 , 14 years ago
comment:2 by , 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 , 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 , 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 , 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 , 13 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
comment:7 by , 13 years ago
| Resolution: | Rejected |
|---|---|
| Status: | closed → reopened |
comment:8 by , 13 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | reopened → closed |
The proposed scripts return 0 which is correct as the move cannot be performed to move to a subdir destroying the source dir
Note:
See TracTickets
for help on using tickets.

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