Changeset 37780 for trunk/base


Ignore:
Timestamp:
Jun 23, 2008, 7:00:08 AM (16 years ago)
Author:
eridius@…
Message:

Remove some redundant code in mportinit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports.tcl

    r37453 r37780  
    457457                return -code error "portdbpath $portdbpath does not exist and could not be created: $result"
    458458            }
    459         }
    460     }
    461     if {![file isdirectory $portdbpath]} {
    462         return -code error "$portdbpath is not a directory. Please create the directory $portdbpath and try again"
     459        } else {
     460            return -code error "$portdbpath is not a directory. Please create the directory $portdbpath and try again"
     461        }
    463462    }
    464463
    465464    set registry.path $portdbpath
    466     if {![file isdirectory ${registry.path}]} {
    467         if {![file exists ${registry.path}]} {
    468             if {[catch {file mkdir ${registry.path}} result]} {
    469                 return -code error "portdbpath ${registry.path} does not exist and could not be created: $result"
    470             }
    471         }
    472     }
    473     if {![file isdirectory ${macports::registry.path}]} {
    474         return -code error "${macports::registry.path} is not a directory. Please create the directory $portdbpath and try again"
    475     }
    476465
    477466    # Format for receipts, can currently be either "flat" or "sqlite"
Note: See TracChangeset for help on using the changeset viewer.