ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/do_file.tcl
(Generate patch)

Comparing ray/src/util/do_file.tcl (file contents):
Revision 2.11 by greg, Thu Sep 21 10:29:12 1995 UTC vs.
Revision 2.12 by greg, Tue Oct 17 21:28:20 1995 UTC

# Line 143 | Line 143 | proc putradvar {fi vn} {       # print out a rad variable
143   proc load_vars {f {vl all}} {   # load RIF variables
144          global curmess radvar alldone
145          if {"$f" == ""} {return 0}
146 <        if {! [file exists $f]} {
146 >        if {! [file isfile $f]} {
147                  beep
148                  set curmess "$f: no such file."
149                  return 0
# Line 238 | Line 238 | proc newsave f {               # save a RIF
238                          return 0
239                  }
240          } elseif {[file exists $f]} {
241 +                set ftyp [file type $f]
242 +                if { $ftyp != "file" } {
243 +                        beep
244 +                        set curmess "Selected file $f is a $ftyp."
245 +                        return 0
246 +                }
247                  if [tk_dialog .dlg {Verification} \
248                                  "Overwrite existing file $f?" \
249                                  questhead 1 {Go Ahead} {Cancel}] {
250                          return 0
251                  }
252          }
253 <        if {[file exists $f] && ! [file writable $f] &&
253 >        if {[file isfile $f] && ! [file writable $f] &&
254                          [catch {exec chmod u+w $f} curmess]} {
255                  beep
256                  return 0
# Line 261 | Line 267 | proc newsave f {               # save a RIF
267   proc newnew f {                 # create a new RIF
268          global rifname readonly curmess radvar
269          if [file exists $f] {
270 +                set ftyp [file type $f]
271 +                if { $ftyp != "file" } {
272 +                        beep
273 +                        set curmess "Selected file $f is a $ftyp."
274 +                        return 0
275 +                }
276                  if [tk_dialog .dlg {Verification} \
277                                  "File $f exists -- disregard it?" \
278                                  questhead 1 {Yes} {Cancel}] {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines