Changeset 490 for trunk/launch


Ignore:
Timestamp:
02/15/09 04:44:59 (16 years ago)
Author:
Nicholas Riley
Message:

display alias targets

Location:
trunk/launch/launch
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/launch/launch/README

    r477 r490  
    226226 - updated error codes for Mac OS X 10.4
    227227 - read Info.plists embedded in all Mach-O binaries (e.g. hdiutil)
     228 - display alias targets
    2282291.1 - 30 October 2006
    229230 - -L: send "launch" (ascr/noop) event to app, bypasses automatic
  • trunk/launch/launch/VERSION

    r477 r490  
    1 1.1.1d2
     11.1.1d3
  • trunk/launch/launch/main.c

    r477 r490  
    33 Nicholas Riley <launchsw@sabi.net>
    44
    5  Copyright (c) 2001-08, Nicholas Riley
     5 Copyright (c) 2001-09, Nicholas Riley
    66 All rights reserved.
    77
     
    3737const char *APP_NAME;
    3838
    39 #define VERSION "1.1.1d2"
     39#define VERSION "1.1.1d3"
    4040
    4141#define STRBUF_LEN 1024
     
    135135        "'document' may be a file, folder, or disk - whatever the application can open.\n"
    136136        "'item' may be a file, folder, disk, or URL.\n\n");
    137     fprintf(stderr, "launch "VERSION" (c) 2001-06 Nicholas Riley <http://web.sabi.net/nriley/software/>.\n"
     137    fprintf(stderr, "launch "VERSION" (c) 2001-09 Nicholas Riley <http://web.sabi.net/nriley/software/>.\n"
    138138                    "Please send bugs, suggestions, etc. to <launchsw@sabi.net>.\n");
    139139
     
    901901        printMoreInfoForRef(fsr);
    902902    }
     903
     904    // alias target (note: may modify fsr and url)
     905    if (info.flags & kLSItemInfoIsAliasFile && haveFSRef) {
     906        Boolean targetIsFolder, wasAliased;
     907        err = FSResolveAliasFileWithMountFlags(&fsr, false, &targetIsFolder, &wasAliased, kResolveAliasFileNoUI);
     908        if (err != noErr)
     909            printf("\t[can't resolve alias: %s]\n", osstatusstr(err));
     910        else if (wasAliased) {
     911            url = CFURLCreateFromFSRef(NULL, &fsr);
     912            if (url != NULL) {
     913                printf("\ttarget: ");
     914                printPathFromURL(url, stdout);
     915                CFRelease(url);
     916            }
     917        }
     918    }
    903919}
    904920
Note: See TracChangeset for help on using the changeset viewer.