← All bug reports

FS#1717small fix in startup script

Type
Bug
Status
Closed
Resolution
Not a bug
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.19.2
Operating system
Linux (All / Other)
Reported
2018-02-13 by thambs
Closed
2018-03-22 by andrew
Votes
1

The current startup script fails when called through symbolic link due to string:

DIR=${0%/*}

It is better to change it to:

DIR=$(dirname -- $(readlink -f -- $0))

Comments (1)

andrew 2018-03-13

readlink has other problems (non-standard, see http://mywiki.wooledge.org/BashFAQ/028)

Using PWD would very likely break existing use cases.

For now, we're moving to BASH_SOURCE which is also not perfect but seems to cover most use cases and assures backwards compatibility.

Feel free to comment..