Construct File Names to Watch Out For

Discussion and feedback on Construct 2

Post » Mon Feb 22, 2016 1:47 am

A few weeks ago I was about 100 hours into a project, regularly committing my project to a Subversion repository and generally making a lot of progress and enjoying using Construct 2. Then something went wrong. Subversion refused to accept my commit because of "missing files" (I was saving my project as multiple files, not the default single capx). But I could see the files! I tried opening them manually and Windows complained as well. What in the world?

Instantly, I felt betrayed by Construct. My last commit was five hours old, and although not the worst that could have happened, I didn't want to redo the last five hours, but more importantly, I was afraid it could happen again. I switched over to one of the other game engines I also use.

Well, on a whim, a couple of days ago I Googled my problem and I couldn't believe what I found the problem was. And it wasn't Construct's fault. I hereby officially send my apologies to the Construct team for my hasty judgement.

As I mentioned earlier, I was saving my project as multiple files. I have an object in my game that I call the "Auxilliary Monitor". I gave it the object type name of "aux". Therefore Construct saved out the necessary files with names such as "aux.xml". Well guess what? Windows 7 has a list of file names you are supposed to never use, and, you guessed it, aux is one of them. Unbelievable.

So I'm back in Construct 2 and really loving it again. I hope this post comes up for anyone who runs into similar trouble.
B
8
S
2
Posts: 4
Reputation: 526

Post » Mon Feb 22, 2016 4:01 am

Thanks for the info!
B
33
S
14
G
4
Posts: 172
Reputation: 4,033

Post » Tue Feb 23, 2016 7:44 am

Good to know about this. Thanks.
B
135
S
33
G
17
Posts: 1,557
Reputation: 20,715

Post » Tue Feb 23, 2016 11:44 pm

Thanks for making this clear, this can be a possible way to reproduce other bugs which could be related to this.

Perhaps this could be added to C2/C3 in future.
Maybe some sort of external file with all names, which the engine uses to check if you are allowed to use a name or not.
(Just an idea thou, not a must-have.)
ImageImageImage
B
60
S
22
G
78
Posts: 646
Reputation: 44,730

Post » Wed Feb 24, 2016 12:53 pm

This is a very weird ancient compatibility issue with Windows that goes back to DOS 1.0! Here's a blog explaining where it originally stems from: https://blogs.msdn.microsoft.com/oldnewthing/20031022-00/?p=42073 (it was done before DOS even had subfolders!)

I didn't realise it affected filename extensions as well. If you try to create a file called "lpt1" on your desktop for example, Windows shows an error. But even "lpt1.txt", "lpt1.xml" etc show errors, for the reasons explained in that article.

I think I can protect C2 from running in to this by adding those names as reserved names which are not allowed to be used. It could be a problem if people are using projects which already use these names, but I'll put it in a beta release and see how it goes. It should prevent this problem ever happening again.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Wed Feb 24, 2016 1:44 pm

Ashley wrote:... It could be a problem if people are using projects which already use these names, but I'll put it in a beta release and see how it goes. It should prevent this problem ever happening again.

Thanks Ashley, I don't know if it is possible but could you maybe add a notification system for those projects who already use the reserved names?
ImageImageImage
B
60
S
22
G
78
Posts: 646
Reputation: 44,730


Return to Construct 2 General

Who is online

Users browsing this forum: paxto22, Yahoo [Bot] and 6 guests