Ignore:
Timestamp:
Sep 16, 2002, 7:48:59 AM (16 years ago)
Author:
jkh
Message:

Add some seat belts:

  1. Try to create $prefix if it doesn't exist.
  2. Check to see if $statefile is writable before opening it for append access.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r651 r655  
    737737    }
    738738    # flock Portfile
    739         set statefile [file join $portpath $workdir .darwinports.state]
     739    set statefile [file join $portpath $workdir .darwinports.state]
     740    if {[file exists $statefile] && ![file writable $statefile]} {
     741        return -code error "$statefile is not writable - check permission on port directory"
     742    }
    740743    set fd [open $statefile a+]
    741744    if [catch {flock $fd -exclusive -noblock} result] {
Note: See TracChangeset for help on using the changeset viewer.