Open Defenastrator opened 4 years ago
@Defenastrator Thanks for making this, I'd completely forgotten about the chat on discord while my pc was in pieces!
I get the first change to add escaped quotes to the path but could you explain the second change? What is that Replace
doing if all "
characters are trimmed? (also why trim it at all, isn't "
disallowed in windows paths? But also ` isn't 🙃)
First part done in 7c72fda168164d64d94b31badbae54c89e996fc9
Trim removes " from the front and back of the string it. While" is disallowed by ntfs and fat32, this is a restriction of the file system not windows. Windows drivers exist for other file system formats and network resources may be of any underlying format many of which support quotes thus paths that contain quotes are entirely possible though admittedly improbable.
A product of working in highly multi-platform environments is extreme paranoia when programming leading to thinking along the lines of "what if this script is running on what if this script is running on a cell port of mac os 7 with the system language set to Japanese that is virtualized accessing a Russian network file system formatted in a format that does not exist yet and are set to different time zone while being colocated in a server room in Wisconsin?"
You may want to make the change or write the change off as being my special brand of crazy and ignore it.
On Sun, Jul 5, 2020, 1:37 PM Jay Faulkner notifications@github.com wrote:
First part done in 7c72fda https://github.com/jukibom/audica-mod-starter-template/commit/7c72fda168164d64d94b31badbae54c89e996fc9
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jukibom/audica-mod-starter-template/issues/1#issuecomment-653916828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHE2A5B2KAMIL4GYL3BX6WDR2C253ANCNFSM4OIYMVEQ .
@Defenastrator Ooohh trim only affects the front and back, gotcha. Okay cool, is there a reason for the double-escape backtick for the "
char in the replace? I'm just curious what it does and it's quite hard to google!
When get-started.ps1 passes the Audica install directory to copy-references.ps1 on line 69 the Audica path is not correctly escaped. Changing line 69 to
Invoke-Expression -Command ".\copy-references.ps1 `"${AudicaPath}`" AudicaMod"
and adding$AudicaPath = $AudicaPath.Trim('"').Trim("'").Replace('"','``"')
after line 37 should fix all escaping issues.