Changeset 123
- Timestamp:
- 08/24/07 04:42:52 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified cl-darcs/trunk/util.lisp ¶
r107 r123 1 ;;; Copyright (C) 2006 Magnus Henoch1 ;;; Copyright (C) 2006, 2007 Magnus Henoch 2 2 ;;; 3 3 ;;; This program is free software; you can redistribute it and/or … … 226 226 :name filename-without-dot :type type)))))) 227 227 228 (defun pathname-sane-p (pathname) 229 "Return true if PATHNAME is a relative path going strictly down." 230 (let ((directory (pathname-directory pathname))) 231 (and (listp directory) 232 (eql (car directory) :relative) 233 (every #'stringp (cdr directory))))) 234 228 235 (defun pathname-to-string (pathname) 229 236 "Convert PATHNAME to a string usable in darcs patch files. 230 237 PATHNAME is assumed to be a relative pathname going strictly down, 231 238 as returned by SANITIZE-FILENAME." 239 (assert (pathname-sane-p pathname)) 232 240 (apply #'concatenate 'string 233 241 "./"
Note: See TracChangeset
for help on using the changeset viewer.