Commit 14d5fd41 authored by Dave Cooper's avatar Dave Cooper
Browse files

give immediate error when data folder is not present.

parent 5178804f
......@@ -20,33 +20,6 @@
(in-package :gdl-user)
;;
;; For convenience, look for data folder two levels up, one level up,
;; and in same directory as source file.
;;
(defparameter *data-folder*
(or (probe-file
(merge-pathnames "../../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(probe-file
(merge-pathnames "../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(probe-file
(merge-pathnames "data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))))
......@@ -160,3 +133,37 @@
:objects ((box :type 'box
:hidden? t
:display-controls (list :color :orange :transparency 0.7))))
;;
;; For convenience, look for data folder two levels up, one level up,
;; and in same directory as source file.
;;
(defparameter *data-folder*
(or (probe-file
(merge-pathnames "../../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(probe-file
(merge-pathnames "../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(probe-file
(merge-pathnames "../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(error "Your data folder is not there. Please make a data folder with
aircraft and points data, two or one or zero directory levels up from the
directory of this source file.~%")))
......@@ -19,12 +19,7 @@
(in-package :gdl-user)
(defparameter *data-folder* (merge-pathnames "../../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
......@@ -162,3 +157,38 @@
:objects ((box :type 'box
:hidden? t
:display-controls (list :color :orange :transparency 0.7))))
;;
;; For convenience, look for data folder two levels up, one level up,
;; and in same directory as source file.
;;
(defparameter *data-folder*
(or (probe-file
(merge-pathnames "../../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(probe-file
(merge-pathnames "../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(probe-file
(merge-pathnames "../data/"
(make-pathname :name nil
:type nil
:defaults excl:*source-pathname*
;; in future: (glisp:source-pathname)
)))
(error "Your data folder is not there. Please make a data folder with
aircraft and points data, two or one or zero directory levels up from the
directory of this source file.~%")))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment