bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWorkspace bug


From: Enrico Sersale
Subject: Re: NSWorkspace bug
Date: Wed, 2 Oct 2002 14:34:36 +0300 (EEST)

On Wed, 2 Oct 2002, Richard Frith-Macdonald wrote:

>
> On Tuesday, October 1, 2002, at 07:11  pm, Enrico Sersale wrote:
>
> >
> > -getInfoForFile:application:type: seems to consider only the case in
> > which
> > the file extension is equal to "bundle" to return NSPlainFileType when
> > the type returned by NSFileManager is NSFileTypeDirectory.
> >
> > This is wrong, because, some applications as, for examples,
> > Preferences,
> > declare an extension in their NSTypes that is used for *directories*
> > that
> > have this extensions.
> >
> > This behaviour forces GWorkspace to use some ugly workarounds to not
> > show
> > the condents of those directories.
> >
>
> OK ... I've changed the method to try to get it to work as I think you
> want.
>
> First I wasted a while on MacOS 10.2 trying to figure out what MacOS
> did -
> only to discover that the method is broken in MacOS, and only ever
> seems to
> return the file extension rather than any of the file type constants.

this works only changing:

          else if (*appName != nil)
            {
              *type = NSPlainFileType;
            }
with:

          else if (*appName != nil && [extension length])
            {
              *type = NSPlainFileType;
            }

because there are around some app-wrappers that, in their
Info-gnustep.plist have something like this:

    {
      NSUnixExtensions = ( "" );
      NSIcon = "generic-text.tiff";
    }

so, all the directories are opened as plain files...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]