Modify ↓
Opened 17 years ago
Closed 17 years ago
#843 closed Bug (No Bug)
@ScriptDir macro returning backslash when script is in drive root causes script to fail
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.0.0 | Severity: | None |
| Keywords: | @ScriptDir Macro Root Drive | Cc: |
Description
I know that this has been previously raised more than once bat has been declared as 'No Bug' but it DOES cause scripts to fail.
As was correctly pointed in the reply to bug #785, the drive root alone would be an invalid path (i.e. K:\ is valid, K: isn't) but it means that @ScriptDir & "\Fred.exe" expands to (say) K:
Fred.exe which is also invalid.
I respectfully suggest that, on root of a drive, it would be better if @ScriptDir expanded to
Drive:\. which, in the example above would give the valid full path K:\.\Fred.exe
Attachments (0)
Note:
See TracTickets
for help on using tickets.

The path "K:\.\Fred.exe" is likely to be just as invalid as "K:
Fred.exe" to any application failing on the latter.
This. Is. Not. A. Bug.
Stop opening tickets on it. We are not going to change the behavior. If this is an issue for you then you can fix it. One of the simplest ways is to write: