alec-hs / Flaxs-Arma-Server-Tool-2

Full rebuild of my tool for installing and updating Arma 3 server with built in features for managing Steam Workshop mods.
https://forums.bohemia.net/forums/topic/220433-fast2-arma-server-and-steam-workshop-tool/
GNU General Public License v3.0
35 stars 21 forks source link

Fix incorrect Substring logic causing launcher file imports to fail #120

Closed wakeuphate closed 4 years ago

wakeuphate commented 4 years ago

As per my other PR, feel free to tell me if I've steered wrong here; but testing locally this Substring fix seems to strip the final </a> from the import link before it's passed on to SteamMod.AddSteamMod() which allows the file import to continue. Maybe the SteamAPI was changed at some point which broke the previous implementation, as it was stripping a majority of the IDs from the URLs.

I've tested this with my local exported HTML modset from the A3 client and all mods are pulled into the FAST2 Application just fine, though I'm aware there may be some edge cases I'm not thinking of.

wakeuphate commented 4 years ago

You can actually ignore this; Turns out my file was randomly mangled and included a newline between the link and the data-type. Not really sure how that happened:

One Export:

<a href="http://steamcommunity.com/sharedfiles/filedetails/?id=893346105"
            data-type="Link">http://steamcommunity.com/sharedfiles/filedetails/?id=893346105</a>

Other Export:

<a href="http://steamcommunity.com/sharedfiles/filedetails/?id=893346105" data-type="Link">http://steamcommunity.com/sharedfiles/filedetails/?id=893346105</a>