trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
131 stars 19 forks source link

Load model with absolute path FILE name #686

Closed trevorsandy closed 1 year ago

trevorsandy commented 1 year ago

Subject

Add the ability to load model files with an absolute file path LDraw FILE name.

For example:

0 FILE K:\LEGO\Lego\Sets\Building instructions\Finished\MOC\Flowers and vases\Vase 3.ldr
0 Vase 3
0 Name: Vase 3.ldr
0 Author: Rene Frijhoff
0 Vase for set 10313
0 ROTATION CENTER 0 0 0 1 "Custom" 
0 ROTATION CONFIG 0 0
1 15 0 0 0 1 0 0 0 1 0 0 0 1 6143.dat
1 15 0 -24 0 1 0 0 0 1 0 0 0 1 6143.dat
1 15 0 -32 0 1 0 0 0 1 0 0 0 1 75937.dat

Environment

Version of LPub3D - 2.4.7 Operating system - All

Expected behaviour

The model should load without abnormal behaviour

Actual behaviour

Application lock or abnormal end attempting to resolve file name with invalid syntax

Solution

Evaluate file name and use complete base name if path separators detected.

Cheers,

trevorsandy commented 1 year ago

This behaviour has been changed as described above.

Cheers,