Batfoxkid / Freak-Fortress-2-Rewrite

The gamemode that's now also a standalone boss maker.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
17 stars 7 forks source link

[Bug] Having a file with a letter beginning in "t" with a backslash causes files to not work properly #35

Open DanishSoup opened 1 year ago

DanishSoup commented 1 year ago

Description

When using a file beginning in '"t" with a backslash in my case a sound file, ff2:r will cause the file to not be used and won't be download.

Reproduce

Steps to reproduce the behavior:

  1. Use a file that begins with "t" with a backslash ex: "sound\freak_fortress_2\oddworld\time_to_get_free.mp3" in a config
  2. Start up the server
  3. See error L 10/02/2022 - 18:56:20: [freak_fortress_2.smx] [Boss] 'abe' is missing file 'sound\freak_fortress_2\oddworld ime_to_get_free.mp3' in 'download' TF2 Console: Failed to create decoder for MP3 [ freak_fortress_2/oddworld ime_to_get_free.mp3 ]

Media

If applicable, add screenshots, videos, logs, to help explain your problem. https://i.imgur.com/JJkfe1F.png

Environment

Other Information

Add any other context about the problem here. Server won't download the file nor use it even if it was downloaded beforehand. This problem does not happen when using a forward slash only when using backslash ex: "sound\freak_fortress_2\oddworld/time_to_get_free.mp3" or "sound/freak_fortress_2/oddworld/time_to_get_free.mp3" will download and play the file.

naydef commented 1 year ago

Probably the backslash acts here like an escape character and combined with t turns into tab character. I'm not sure whether the SMC parser can be set to not interpret escape sequences.

I'd recommend using Unix-like directory separator in configs (forward slash /) and just not deal with the issue. The source engine automatically converts between forward slash and backward slash. Also the Windows API seems to accept forward slashes, too.