RosaryMala / armok-vision

A 3d realtime visualizer for Dwarf Fortress
MIT License
320 stars 27 forks source link

Inconsistent slash direction in xml file loading paths #40

Open izik1 opened 7 years ago

izik1 commented 7 years ago

Steps to reproduce:

  1. Open armok vision
  2. While it is loading the xml files look at the slashes
  3. The last two slashes are backslashes whereas all the other ones are forward Result: armok vision bug (user directory is the empty one. actually user directory name hidden for privacy purposes)
lethosor commented 7 years ago

This should work on Windows, but if the backslashes are hardcoded, it could cause issues like #2 on Linux/OS X.

izik1 commented 7 years ago

perhaps as a fix the os can be detected using Application.Platform and insert forward / backslashes based on that?

lethosor commented 7 years ago

Forward slashes should work on Windows (#2).

izik1 commented 7 years ago

Oh, I forgot a major part of any bug report. I am running windows 7. So it probably really is just a cosmetic issue (the reason why I originally suggested minor as a label) the slash direction is probably default for the OS or unity. Not sure though.

lethosor commented 7 years ago

Yeah, the "U:/" in the path indicated that it was Windows. I'm not sure if Armok Vision or Unity is choosing the type of slash here. If Armok Vision is always choosing backslashes, it would break on other platforms, so this could be an issue. Anyway, consistency wouldn't hurt.

(There wasn't a "minor" label to choose from before, but I'll add it.)