Changeset 5815


Ignore:
Timestamp:
02/14/04 00:21:15 (17 years ago)
Author:
piso
Message:

_makePathname()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Pathname.java

    r5754 r5815  
    33 *
    44 * Copyright (C) 2003-2004 Peter Graves
    5  * $Id: Pathname.java,v 1.49 2004-02-10 23:42:34 piso Exp $
     5 * $Id: Pathname.java,v 1.50 2004-02-14 00:21:15 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    552552        Pathname p = new Pathname();
    553553        Pathname defaults = null;
     554        boolean nameSupplied = false;
     555        boolean typeSupplied = false;
    554556        for (int i = 0; i < args.length; i += 2) {
    555557            LispObject key = args[i];
     
    568570            } else if (key == Keyword.NAME) {
    569571                p.name = value;
     572                nameSupplied = true;
    570573            } else if (key == Keyword.TYPE) {
    571574                p.type = value;
     575                typeSupplied = true;
    572576            } else if (key == Keyword.VERSION) {
    573577                p.version = value;
     
    581585            // Ignore host and device. FIXME Windows!
    582586            p.directory = mergeDirectories(p.directory, defaults.directory);
    583             if (p.name == NIL)
     587            if (!nameSupplied)
    584588                p.name = defaults.name;
    585             if (p.type == NIL)
     589            if (!typeSupplied)
    586590                p.type = defaults.type;
    587591        }
Note: See TracChangeset for help on using the changeset viewer.