Git Product home page Git Product logo

Comments (4)

jonpas avatar jonpas commented on July 22, 2024

@PabstMirror @BrettMayson

from armascriptcompiler.

dedmen avatar dedmen commented on July 22, 2024

Not just security, this will also lead to incorrect in-game paths.
Arma 3 base files have the same issue, resulting in
/temp/bin/A3/Functions_F/Ambient/fn_ambientAnim.sqf
instead of
\A3\Functions_F\Ambient\fn_ambientAnim.sqf

from armascriptcompiler.

dedmen avatar dedmen commented on July 22, 2024

The problem is that the "root" what would often be a p-drive root. Is unknown.
We can try finding it by looking for PBOPREFIX, which might solve most cases (doesn't solve our vanilla A3 case)

Instead of that, I'll add "rootPathMapping" config entry.
They will map physical paths to virtual paths.

So in your case the root path might be
"C:/Users/username/Appdata/Local/Temp/hemtt/DEV_CBA_A3/asc/source" -> "\x\cba"
Such that your file instead of
/Users/username/Appdata/Local/Temp/hemtt/DEV_CBA_A3/asc/source/addons/common/fnc_test.sqf
will be translated to
\x\cba\addons/common/fnc_test.sqf

from armascriptcompiler.

dedmen avatar dedmen commented on July 22, 2024

Also important note on this, this changes how the outputPath is handled.
result file is outputPath/virtualPath.
Because the virtualPath was previously bugged, it would output to example
P:/Users/username/Appdata/Local/Temp/hemtt/DEV_CBA_A3/asc/source/addons/common/fnc_test.sqfc
But with the fix, it will now output to
P:\x\cba\addons/common/fnc_test.sqf

from armascriptcompiler.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.