An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Page 3 of 3 1 2 3
Re: Removing an App
ganbustein #32859 02/01/15 05:56 AM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
Unfortunately, the downside with this strange deception (other than, of course, a certain confusion when one compares different versions of Disk Utility, some of which say the trash is /Trash and some of which say it's /.Trash--neither of which is actually the case) is if you have an actual folder named Trash on the root level of your hard drive...in which case, God help you.

And yes, you can do it. I checked.


Photo gallery, all about me, and more: www.xeromag.com/franklin.html
Re: Removing an App
tacit #32861 02/01/15 06:40 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
Not really a problem, beyond the usual "Once we practice to deceive..." admonition. The "/Trash" that Disk Utility and/or Finder shows is a phantom folder, never reachable by that path. Since you can never reach the phantom folder using its path, it can never be confused with a real folder that actually is at that path.

But if you don't want your computer lying to you, abjure Finder and the rest of the GUI, and go straight to Terminal. The command line never lies to you. (Well, almost never. Files whose owner or group equals 99 will always appear to belong to you or your group, respectively. Unless you're root. Nobody lies to root.)

This is not the only deception Finder pulls. It localizes the names of many folders and applications based on your preferred language. Again, the names are changed only as reported by Finder. Under the hood, the real names are unchanged, and at the command line you always see truth.

Finder lies through its teeth when showing you permissions. I don't think it's malice. It's just incompetence. From the Get Info window, it's hopeless to try to figure out what a file's permissions actually are, and changes you make through Get Info are unpredictable.

Bundles, including applications, are actually folders, but Finder always shows them to you as files. Another deception that the command line is no party to.

I know there are people who are scared of the command line, but me? It's the GUI that frightens me.


Last edited by ganbustein; 02/01/15 06:40 AM.
Re: Removing an App
ganbustein #32902 02/02/15 08:23 PM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
Originally Posted By: ganbustein
This is not the only deception Finder pulls. It localizes the names of many folders and applications based on your preferred language.


On a vaguely tangentially related note, speaking of languages, it appears there's some funkiness in the way the Finder reports names with accented characters in them. If you use the version of PHP that ships with OS X and you write code that accesses files in the local filesystem, PHP appears not to be able to read files whose names contain accented characters, no matter what character encoding you use, even if the file paths and names appear identical in the Finder and PHP. I've never been able to figure out what gives with that.


Photo gallery, all about me, and more: www.xeromag.com/franklin.html
Re: Removing an App
tacit #32903 02/02/15 08:42 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
Originally Posted By: tacit
[On a vaguely tangentially related note, speaking of languages, it appears there's some funkiness in the way the Finder reports names with accented characters in them. If you use the version of PHP that ships with OS X and you write code that accesses files in the local filesystem, PHP appears not to be able to read files whose names contain accented characters, no matter what character encoding you use, even if the file paths and names appear identical in the Finder and PHP. I've never been able to figure out what gives with that.

This may have to do with the fact that HFS+ uses "fully decomposed canonical" characters, stored on disk using UTF-16. PHP is probably using UTF-8, but that's no problem. The conversion between UTF-16 and UTF-8 is mechanical and trivial. The "fully decomposed" part is more interesting.

For example, the letter "á" (an "a" with an acute accent), can be written in Unicode as either the single codepoint 00E0 (LATIN SMALL LETTER A WITH ACUTE), or as the pair of codepoints 0061 0301 (LATIN SMALL LETTER A followed by COMBINING ACUTE ACCENT). HFS+ insists on the latter, even though the printed glyph is exactly the same.

Even this conversion should happen automatically. Perhaps PHP is doing something to prevent the conversion.

Re: Removing an App
ganbustein #32935 02/03/15 11:06 PM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
PHP supposedly supports both UTF-8 and UTF-16 with mb_convert_encoding, so there might be a way to force PHP to play nicely with Finder accented characters, but at the moment I don't have time to mess with it. The problem crops up in a FOSS cloud file storage app I was tinkering with (the developers actually withdrew the OS X version of the app because of it).


Photo gallery, all about me, and more: www.xeromag.com/franklin.html
Page 3 of 3 1 2 3

Moderated by  alternaut, dianne, dkmarsh 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.027s Queries: 25 (0.021s) Memory: 0.5983 MB (Peak: 0.6829 MB) Data Comp: Zlib Server Time: 2024-03-28 21:39:54 UTC
Valid HTML 5 and Valid CSS