Why does system 7 finder appear normal?

Intelligent

macrumors 6502a
Original poster
Aug 7, 2013
933
2
I just looked into a dmg file that i had of system 7 and located finder, why does system 7 finder have to normal logo? it just says last edited 1996, and why open it, it says something like "this cannot be opened because it is used by Mac OS X"?
 

KoolAid-Drink

macrumors 65816
Sep 18, 2013
1,347
325
USA
I have the same thing happen! It actually also happened under 10.6/7/8, so it's not new to 10.9.

My guess is that even though the old Finder file for System 7 was completely different, perhaps Apple still recognizes the file as the Finder "executable" from back then, and "protects" it from being opened in the OS X environment (and possibly causing weird damage/artifacts to occur), thereby popping that message up? I know the Classic (OS 9 and older) systems were completely different from the current NeXT/OS X systems, but maybe internally, the Finder and certain system files still recognize older system files somehow. Not sure.

Anyone else who has any guesses or internal knowledge, please pipe in.
 

SlCKB0Y

macrumors 68040
Feb 25, 2012
3,142
197
Sydney, Australia
It's not protecting the system from anything since there is no way it could run the old finder. It is incompatible both in terms of OS and CPU architecture.
 

KoolAid-Drink

macrumors 65816
Sep 18, 2013
1,347
325
USA
Then what's your theory as of why the 2013 10.9 Finder recognizes the 1995-era System 7 version of Finder as "its own"?

It's not protecting the system from anything since there is no way it could run the old finder. It is incompatible both in terms of OS and CPU architecture.
 

chown33

Moderator
Staff member
Aug 9, 2009
8,497
4,459
Pale blue comma
Then what's your theory as of why the 2013 10.9 Finder recognizes the 1995-era System 7 version of Finder as "its own"?
It's probably because the System 7 Finder has the "system" bit set in its Finder-flags. This was used to prevent accidental deletion, among other things. That is, if you dragged a system file to the Trash, the Finder would prohibit it, or maybe confirm with an OK/Cancel dialog (I've forgotten exactly which).

The system-bit is a single bit in a flags field of the FinderInfo metadata of a file (bozo-bit and custom-icon-bit are two others). The FinderInfo itself is a 32-byte struct. It's currently stored as the special xattr com.apple.FinderInfo, and still houses some things that are used today, such as the alias-bit, the item's color (primary tag in Mavericks), and the creator-ID and file-type (if the file has those).

See here:
http://help.bombich.com/discussions/questions/4762-comapplefinderinfo-on-lion-vs-snow-leopard
and search for finder_flags.

If you want to convince the modern Finder to open the ancient Finder, you'll have to delete the com.apple.FinderInfo xattr. In theory, simply clearing the system-bit should suffice, but I'd have to look up the details on it. A Terminal command that removes the xattr is:
Code:
xattr -d com.apple.FinderInfo path/to/your/ancient/Finder
Opening ancient-Finder won't show anything, because it has no data-fork, only a resource-fork. All the executable code is stored as CODE resources.


There's more to FinderInfo, but to get all the dusty details I'd have to dig out my old paper copies of "Inside Macintosh".


EDIT
After some experimenting, it looks like the Finder-flags have no effect. It's the file-type and creator-ID that elicit the alert from modern Finder.

Using the SetFile and GetFileInfo command-line tools:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/SetFile.1.html
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/GetFileInfo.1.html#//apple_ref/doc/man/1/GetFileInfo

I turned off each of the attribute bits in turn. The ancient Finder file still wouldn't open.

Then I changed the creator-ID to "????". It still wouldn't open.

Finally, I changed the file-type to "????". The icon instantly reverted to a "generic document" icon, and I could open the file.

Then I changed the creator-ID back to "MACS", and I couldn't open the file again.

FWIW, setting the file-type to "FNDR" on any file will cause it to appear with the classic-Mac Finder icon, and the modern Finder will also refuse to open it.


Also, more docs on the FinderInfo struct, the bits in the flags, etc.:
http://www.opensource.apple.com/source/bless/bless-3/libbless/FrameworkCompat/compatCarbon.h?txt

The struct member is fdFlags. The bits are defined in the nameless enum whose first item is kIsOnDesk.
 
Last edited: