mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 02:46:10 +02:00
Fix archive filename matching, recent regression.
The census test didn't pass anymore because I broke the archive filename matching in b17383fa90b81408fa08566bc131ea5b02606023, where the special variable *csv-path-root* stoped being authoritative in the archive case. To fix, initialize that variable to nil and give its value priority as soon as it's non-nil, such as the archive case.
This commit is contained in:
parent
352a833400
commit
b4dac6b684
@ -57,8 +57,8 @@
|
||||
(defparameter *state* nil
|
||||
"State of the current loading.")
|
||||
|
||||
(defparameter *csv-path-root*
|
||||
(merge-pathnames "csv/" (user-homedir-pathname)))
|
||||
(defparameter *csv-path-root* nil
|
||||
"Where to load CSV files from, when loading from an archive.")
|
||||
|
||||
(defparameter *root-dir*
|
||||
(make-pathname :directory "/tmp/pgloader/")
|
||||
|
||||
@ -189,7 +189,9 @@
|
||||
(:inline (car part)) ; because of &rest
|
||||
(:stdin *standard-input*)
|
||||
(:regex (destructuring-bind (keep regex root) part
|
||||
(filter-directory regex :keep keep :root root)))
|
||||
(filter-directory regex
|
||||
:keep keep
|
||||
:root (or *csv-path-root* root))))
|
||||
(:filename (let* ((filename (first part))
|
||||
(realname
|
||||
(if (fad:pathname-absolute-p filename) filename
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user