From: Chris Hanson Date: Fri, 18 Sep 1992 18:56:13 +0000 (+0000) Subject: Signal error if user tries to set the pathname of a buffer to a X-Git-Tag: 20090517-FFI~8940 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=083bc9801eaf7d38785a94f56203c73e367be5bc;p=mit-scheme.git Signal error if user tries to set the pathname of a buffer to a directory. --- diff --git a/v7/src/edwin/filcom.scm b/v7/src/edwin/filcom.scm index f7e1e9952..512d892f7 100644 --- a/v7/src/edwin/filcom.scm +++ b/v7/src/edwin/filcom.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/filcom.scm,v 1.167 1992/04/21 17:27:36 mhwu Exp $ +;;; $Id: filcom.scm,v 1.168 1992/09/18 18:56:13 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology ;;; @@ -412,6 +412,9 @@ if you wish to make buffer not be visiting any file." pathname))))) (define (set-visited-pathname buffer pathname) + (if (not (pathname-name pathname)) + (editor-error "File name cannot be a directory: " + (->namestring pathname))) (set-buffer-pathname! buffer pathname) (set-buffer-truename! buffer false) (if pathname