A Trailing Period Bug

November 20, 2022

I recently switched to Team Red and picked up an AMD Radeon 6800 XT to replace an older GPU in my computer since there was a Black Friday promotion. I wanted to try recording some of my gameplay with AMD’s Adrenaline software suite.

I picked a different folder on a different drive as the destination folder (W:\Capture\AMD ReLive), and there I went, recording some of my gameplay. It all seemed to work just fine!

I later went to look at my recordings, and I did stumble upon an issue when I tried to see what I had recorded when I’d been playing NieR Replicant. When trying to open the folder, Windows Explorer complained about the folder not existing.

I looked more closely, and noticed something peculiar. The folder was named NieR Replicant ver.1.22474487139...! This folder title was likely based on the window title of the captured game.

Notice something strange? That’s a trailing period in the folder name (three in fact): while possible to create on the filesystem, this is not officially supported on the Win32 platform. Here’s what Microsoft says about the matter:

Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not. However, it is acceptable to specify a period as the first character of a name. For example, “.temp”.

Oops! So, what about my recordings?

Good news: I could move the recordings from inside the folder to my desktop by copying the files via 7zip’s GUI (thankfully!), but I could not delete or rename the folder.

I was able to delete this particular folder via the Windows Command Line when running as an admin:

rd /s "\\?\W:\Capture\AMD ReLive\NieR Replicant ver.1.22474487139..."

If you’re having this very unlikely issue, you can fix it like that. I also reported the bug to AMD via their bug reporting tool: it seems like they should probably sanitize the name of the folder that is created when saving a game recording.

I do think that this is a very niche bug, because I don’t think many games use window titles that can cause “invalid” folders to be created.

Tagged as: Tech