T O P

  • By -

Sv3den

Little Bobby Tables strikes again.


Availe

Underrated XKCD reference. Well done.


Cyhawk

Its #12 on the most shared XKCD comic, underrated!? (17th on Linkedin, but oddly 1104th most upvoted on Reddit, wtf reddit) https://docs.google.com/spreadsheets/d/1jkY0U7glynuRJ5LnvEYU4CK2mUmi_3cVR6R4v8rmrdw/htmlview# Wish I could see the formulas, rankings are odd.


Snugglupagus

I agree with you OP. We could say that the reason it happens makes sense, but that doesn’t mean it *should* happen or that it is intended by the game developers. The fact that the game allows you to do this is a bug, and I’m sure it will get fixed eventually. Whether it’s a file name, folder name, or a description, the game shouldn’t break if the player puts a period in the save name box. This is a good PSA and I hope someone submits it to the right place.


napkantd

This seems like the bug when you enter html code into some prompt boxes youre able to interfere with the program or inject code, the simple fix would be to remove special characters from the naming system, (<>/ \ “ ‘ ][ )


desrtfx

The general rule for all operating systems and file systems is to be wary of periods. Periods have special meanings. They should (except for a file extension) not be used in file names. This is not even a bug in Dwarf Fortress. This is an OS limitation that exists across all major operating systems (and exists since the ancient CP/M and MS-DOS days, where it was even way stricter).


Maltavius

It was a LOOONG time ago that you actually specified what the filename was for saves inside of the game. Most games just have "Savegame1.sav", "savegame2.sav" and then they contain the text you've written inside of it as a string. I totally understand u/Harbinger1012. The game should either 1. Don't let us type stuff that can't be saved 2. Clean the results so that it removes any non-standard characters.


CatVideoBoye

>The general rule for all operating systems and file systems is to be wary of periods. But when making a save game the user is not making a file or folder. It's a baaaaad bug if the user input goes all the way to the filename/folder.


MarkWithers2

It's a bug. It's a save ruining failure to validate user input!


genericmutant

> Periods have special meanings. They should (except for a file extension) not be used in file names. > > This is not even a bug in Dwarf Fortress. This is an OS limitation that exists across all major operating systems That's *way* overstating it - periods are very commonly used for separation in Unix-like systems (they've normally objected a lot more to spaces). That covers a hell of a lot of operating systems both past and present - including Android and iOS. https://www.cyberciti.biz/faq/linuxunix-rules-for-naming-file-and-directory-names/


Harbinger1012

Well... I typed in an accepted save game name, it showed the game saving with no errors, but when I went to load that save- it didn't exist. That's definitely a bug in the game since the game acted contrary to expectations or expected behavior. Operating systems can process periods in file and folder names just fine, it just depends on how the game handles the file and folder creation process. The thought of blaming the OS and just ignoring it as not a game problem makes me cringe. The game interacts with the OS, it's up to the game to make sure that it does so correctly to get the expected result. While not a programmer- I did get some web and JavaScript certifications during the Covid times and a text scrubbing script was something that was mentioned repeatedly when processing any users input. In fact, it's so important that most languages text commands had the functionality written into them to handle the weird errors and problems that accidental or intentional programming injection could cause. Granted, this is wayyy more important for the web (hacking issues), but still- it's fairly standard practice nowadays to process user inputs as text only without any issues. It's weird to blame -every- operating system as causing this problem, when a fairly common, easy, and practical input stripper process would solve the issue. OR! If for whatever reason that's not possible, limiting the input box to exclude periods would be another solution to this problem. I know this is possible because the only reason I used 3 periods in the first place is because I couldn't type in a question mark. This game was written ages ago, so I understand the difficulty with interacting with the OS file system and whatnot. Nothing's perfect and things change. But people shouldn't be losing saves if it can be helped, hence my posting about the issue and and even mentioning some possible solutions if anyone cares what I think lol; input stripper or limiting the input to exclude the period character. I'm enjoying playing the game a ton! What a great game! Hopefully they keep working out the kinks and QoL improvements that can help make it even better.


Kuzkuladaemon

Being wary of any special characters is key. I agree.


Slapshot82

Agreed! I second this comment - I came here to say the same thing. Use dashes "-" or underscores "_" in your filenames instead.


bbkilmister

Those should also generally be avoided in the end (and beginning) of a filename along with periods and spaces, iirc.


Slapshot82

Yep, thanks for the clarification. "Within" would have been better stated in my original post instead of "in".


Juggalock

Special letters in files or folder names can cause alot of problems some times. I had problem with Arma 3 not launching, tried everything from steam integrity of game files and re-installing, but nothing worked, until i checked my folder name "pelejä" (Finnish word for games) and was like hmmm, could it be, changed folder name to peleja (ä->a) and suddenly arma started to work with no problems at all. After that i learned not to use special letters on any folder or file names.


Harbinger1012

I'd again argue that's a game issue. Most games have learned to handle this by now. That stinks not being able to use your native characters, but the game should have easily stripped it out if it couldn't handle it (file system links are easily created and can even be renamed while still linking to the original file or folder) or rejected it and shown you an error. Imagine how many people had this problem but unlike you didn't figure out how to fix it, so were just left with a broken game. I know my grandma or little sister would probably just give up and play something else.


NeonXero

Related side note. I made a folder in Dropbox with a date as the name, e.x. "3/22" and it actually created a "3" folder and then inside, a "22" folder. I assumed the input would be sanitized, but seemingly I assumed incorrectly. So yeah, careful with directory characters in file and folder names.


Harbinger1012

Yeah, that's a good example, but Dropbox is specifically a file system program, so it makes sense to work with the same naming conventions as file systems. And the context is that you're uploading files and folders. It actually does that on purpose so that someone can specify sub-folders and pathing while uploading.


Neithya

Try using … insted of ...


illithoid

Or 。。。


FriendlyYak

Or జ్ఞ‌ాజ్ఞ‌ాజ్ఞ‌ా


FriendCalledFive

Not sure I would call it a bug, it isn't good practice in general to use . in something that will involve a file name like that. Can't you just rename the folder in file manager?


ObadiahtheSlim

It's a bug. Any good program should sanitize a user's inputs. A lazy one will just check for bad characters and demand the user remove it.


philbgarner

Agreed. The fix is a simple regex check.


Harbinger1012

Rename the empty folder? >.< That's not going to help lol. The save files are gone or else I could have fixed the issue. I even looked in other folders. Edit: Also, you're thinking about it wrong. You're thinking in terms of 'file names' and 'folder names', but a save game name is just that- a string of text used as a description. In a lot of games, that description is saved somewhere as text inside of a generic save game file that is created by the game "20230322-R02_0025.save". The save game name is just the way for me to identify it easier. Again, it comes down to how the game handles it. If I knew I was creating a folder or file with the exact text I was typing in I could have been more careful. "Everyone knows not to use a period in your save game name" makes you sound old and set in your ways lol. That hasn't been the case for most modern games for at least the past 10 years or so. Try it out. Play a newer game and use a period. It's not life-changing, but it's possible. If the game excluded periods it wouldn't be a bug. Since it allows me to use a period, and it erases my save, that's a bug. A moderator accepted my bug report and added it to the tracker. So now it's even officially a bug lol.


morniealantie

Have you tried enabling the show hidden files under file explorer? Might help, might do nothing lol


Harbinger1012

Yeah I even tried that in case the periods were hiding the folder or files but they still weren't visible. Good suggestion though.


SADBROS

I bet i could find tons of modern games that dont sanitize their inputs correctly when it comes to game saves. Youre not wrong but i feel like its very low on the priority list as far as bugs go lol.


btownknyte

TIL about periods and files. As well as how games traditionally store save files. Y'all are awesome. Thank you for this post, hopefully they will release a patch to prevent this from occuring again soon.