Bug or no bug?

Discussion in 'Apple' started by Michelle Steiner, Feb 23, 2012.

  1. This was reported in Mac OS X Hints, and is spreading to other Mac web
    sites. I have not been able to reproduce it. Please try it, and see
    whether you can reproduce it.

    € Create a folder on your Desktop named 'test.'
    € Create a file in that folder also named 'test.'
    € Move the file from the folder onto your Desktop.
    € Click 'Replace.'

    The bug says that both the file and the folder vanish after clicking
    Replace.

    In the third step, the file moves to the desktop, and that's it. Because a
    File and a folder aren't the same kind of thing, they can both exist, and
    there's no dialog.

    I modified the steps by creating a file named test, with the same
    extension, on the desktop before moving the file from the folder to the
    desktop. I then got the dialog, but after clicking Replace, it merely
    replaced the file that was on the desktop.

    -- Michelle
     
    Michelle Steiner, Feb 23, 2012
    #1
    1. Advertisements

  2. Michelle Steiner

    Tim Streater Guest

    Yep, I got it too. If I selected "Keep both", then the file (IIRC)
    became 'test copy'. This is in Lion 10.7.3.

    TextWrangler has a not dissimilar bug if (as I do) you use "Save a
    copy..." a lot. Then you can lose the copy on disk and the copy you're
    editing.

    For the OS X thing, I guess the Q is, what *should* happen?
     
    Tim Streater, Feb 23, 2012
    #2
    1. Advertisements

  3. I got the same result as JR. Scary!
     
    Doug Anderson, Feb 23, 2012
    #3
  4. Ah, yes; that's the key. Now I can duplicate the bug. Thanks.
     
    Michelle Steiner, Feb 23, 2012
    #4
  5. It should tell you that you can't make the copy, as it did in previous
    releases.
     
    Barry Margolin, Feb 23, 2012
    #5
  6. I think early MacOS may have allowed it, but I don't think any release
    of OS X has. I don't think HFS+ supports it, and probably HFS didn't,
    either. It was probably allowed in the original Mac FS.
     
    Barry Margolin, Feb 23, 2012
    #6
  7. Michelle Steiner

    Jim Gibson Guest

    What OS are you using? Lion?

    Under Snow Leopard (10.6.8), you get a dialog box saying "The folder
    "test" can't be replaced by an item it contains."
     
    Jim Gibson, Feb 23, 2012
    #7
  8. Michelle Steiner

    Guest Guest

    that idiot was avie and was the author of that infamous tech note. he's
    long gone but the damage is done.
     
    Guest, Feb 23, 2012
    #8
  9. Michelle Steiner

    Alan Browne Guest

    That's exactly what happens here.

    Anyone tried that in terminal?
     
    Alan Browne, Feb 23, 2012
    #9
  10. Michelle Steiner

    Tim Streater Guest

    Isn't this a manifestation of some unix bullshit wherein folders are
    implemented as files? I had an argument with someone recently about the
    lunacy of this. Perhaps that's at the back of it.
     
    Tim Streater, Feb 23, 2012
    #10
  11. Hm, here both 'test' files - folder and file - are shown on the desktop
    I tried it with a folder and a file with the same extension - such as
    'test.rtf', 'test.doc' etc.. In this case I get a warning dialog that I
    can't do this due "...an unexpected error -8005 occored...".

    If I recall right this means that a file can't replace a folder with
    same name...

    Cheers, Erik Richard

    --
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Erik Richard Sørensen, Member of ADC, <>
    NisusWriter - The Future In Multilingual Text Processing - www.nisus.com
    OpenOffice.org - The Modern Productivity Solution - www.openoffice.org
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    Erik Richard Sørensen, Feb 23, 2012
    #11
  12. Michelle Steiner

    Alan Browne Guest

    Before the move, did you remove the extension from the file in the folder?
     
    Alan Browne, Feb 23, 2012
    #12
  13. First try yes, second try no. Both tries same result.

    Cheers, Erik Richard

    --
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Erik Richard Sørensen, Member of ADC, <>
    NisusWriter - The Future In Multilingual Text Processing - www.nisus.com
    OpenOffice.org - The Modern Productivity Solution - www.openoffice.org
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    Erik Richard Sørensen, Feb 23, 2012
    #13
  14. It's not whether folders are implemented as files, but the fact that the
    folder name is a directory entry in the containing folder, and names
    must be unique. So you can only have one thing named "test" in the
    folder.

    In order to do the replace, it has to delete the old thing and then copy
    the file into place. But deleting the old thing means wiping out the
    directory and all its contents, and then there's no file to copy into
    its place.

    Another way it could get it right is by renaming things -- either rename
    the folder, copy the file, then delete the folder, or copy the file to a
    temporary name, delete the folder, and then rename the temporary file to
    the original name.
     
    Barry Margolin, Feb 23, 2012
    #14
  15. Michelle Steiner

    Tim Streater Guest

     
    Tim Streater, Feb 23, 2012
    #15
  16.  
    Barry Margolin, Feb 23, 2012
    #16
  17. Michelle Steiner

    Király Guest

    $ mv test ../test
    mv: test and ../test/test are identical
     
    Király, Feb 24, 2012
    #17
  18. Yeah, with a folder, but try it with a file.
     
    Michelle Steiner, Feb 24, 2012
    #18
  19. That's what he dud. There's a folder "test" that contains a file
    "test". You get that error when you try to replace the folder with the
    file.
     
    Barry Margolin, Feb 24, 2012
    #19
  20. That's what he dud. There's a folder "test" that contains a file
    "test". You get that error when you try to replace the folder with the
    file.[/QUOTE]

    If you move a file from within a folder to that folder's containing folder,
    and they both have the same name, the file will move without a problem if
    it has an extension, and will get you the Replace/Keep Both/Cancel dialog
    if the file doesn't have an extension.

    The only way you get the "can't be replaced by an item it contains" dialog
    is if both are folders.
     
    Michelle Steiner, Feb 24, 2012
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.