PDA

View Full Version : New Campaign with period in title



Neovirtus
July 23rd, 2023, 02:12
I made a new campaign yesterday, and then when it loaded into the tabletop it gave me a warning that it was unable to find the campaign directory and that it failed to save. So I exited out and went and looked. Sure enough the folder had been made, but I could not read or write to it, or even delete it. Windows kept throwing errors that the directory was not available. I puzzled over this for a bit. All the other folders were still there and working perfectly, and another new campaign worked fine. The only issue I could identify was that the failed campaign folder I had chosen to use a period in the title of the campaign. This made a folder with a period in the name, and that seems like a Windows problem.

So all this is to say, perhaps Fantasy Grounds should not allow a period to be in the name of the campaign, or alternatively not pass that on to the folder directory that is made. Assuming I have correctly identified the issue. Also, I now have a folder that I cannot use, and cannot delete. Any assistance on how to manually remove this directory would be appreciated.

Sulimo
July 23rd, 2023, 06:22
If you open a Command Prompt and navigate to the proper location of the folder you can delete it by using the following command:


rd /s "\\?\c:\<path_to_folder that has a trailing period>"

Make sure to use " around the full command, this makes it so Windows understands that the path does not end after a space.

It should be something like this:


rd /s "\\?\c:\users\<username>\Fantasy Grounds\Campaigns\This is a Test."

I used 'This is a Test.' (with the training period) as an example campaign folder name.

Per Microsoft (https://learn.microsoft.com/en-us/troubleshoot/windows-server/backup-and-storage/cannot-delete-file-folder-on-ntfs-file-system#cause-6-the-file-name-includes-an-invalid-name-in-the-win32-name-space):


You can't delete a file if the file name includes an invalid name. For example, the file name has a trailing space or a trailing period, or the file name is made up of a space only. To resolve this issue, use a tool that uses the appropriate internal syntax to delete the file. You can use the "\\?\" syntax with some tools to operate on these files. Here's an example:

I did a quick test, and was able to delete the folder I created with FG this way.

I also got an error in FG when I tried it, even though it did create the folder.

https://i.imgur.com/Gw3kRWo.png


I'm guessing whatever Unity uses for file system access does not have a check for invalid file/folder names, SmiteWorks can possibly alert Unity to the issue, but likely cannot address the issue themselves.

Moon Wizard
July 23rd, 2023, 07:48
Thanks for reporting; I'll add the period character to the invalid file characters with the next client build (no current date yet). Invalid file characters (such as colon) currently get encoded before being saved.

Regards,
JPG