Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Creating an article and folder of the same name

[Note: for this posting, article and file are different: articles are created with the New Article button and are associated with a template. Files are created using the New HTML button and are not associated with a template]

I want to be able to create an article and a folder using the same name, and have them both in the same parent folder. This should be OK, because the article will actually have an extension (eg HTML) so they won't be the same when published. (Windows at least doesn't allow a folder and a file of the same name).

However, strange things happen:

A. If I create the folder first (eg "test"), then the article (eg "test"), I don't get an error message, but under the covers, the article is renamed to "test-2".

B. If I create the article first (eg "test"), then the folder (eg "test"), then I get the error message "Duplicate name".

Comments:
* I would expect to be able to create an article and folder of the same name.
* I would expect NOT to be able to create a file and a folder of the same name, since the file won't be getting an extension from the template.
* The result of A & B above should be the same, for both article and file creation.

Is this three bugs?

David.

David Watts
Thursday, June 17, 2004

This is a very old one:

http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=713&ixReplies=3

tk
Thursday, June 17, 2004

TK, thanks for that. I did do a search before I posted but didn't find that one.

So it sounds like Fog Creek acknowledge it is a bug but it hasn't been fixed yet?

Joel's reply suggests that it should be OK to have a folder and an article of the same name. The workaround that Michael suggests (create the folder, then create the article) doesn't work because the article just gets renamed under the covers.

David.

David Watts
Friday, June 18, 2004

No, it's not a bug, it's by design. Joel has explained elsewhere that there's nothing to stop you creating a template that has no extension. If your article had the same name as a folder, and the article gets published to a file with no extension, you'll have a situation that many OSes can't handle (a directory and a file with exactly the same name).

Darren Collins
Sunday, June 20, 2004

*  Recent Topics

*  Fog Creek Home