WormBase / pseudoace

Modelling the WormBase ACeDB database in datomic.
4 stars 3 forks source link

Missing forward-slash in "--log-dir" option causes import to fail #6

Closed mgrbyte closed 8 years ago

mgrbyte commented 8 years ago

The import command line utility will silently* fail to work as indended if the --log-dir option is specified as a path without a trailing slash.

Normalize directory paths and validate they exist before using, .e.g:


(def log-dir (io/file (:log-dir options)))
(if-not (.exists (io/file log-dir))
    ;; will raise if file does not exist
    (throw (FileNotFoundException. "Specified log directory does not exist")))

[*] I accidentally did this whilst running the import and got mightly confused, since the .edn.sort.gz files were created but in the parent directory of the path I specified (due to use of string concatenation)