                                   (assoc :path "?TMP?")
                                   files-save)
          path (save-file tempfile
-                         (str (tf/unparse (tf/formatter-local "/yyyy/MM/dd/") (tl/local-now)) id "/")
+                         (str (tf/unparse (tf/formatter-local "yyyy/MM/dd/") (tl/local-now)) id)
                          (file-row :filename))]
      (-> new-row
          (assoc :path path)

;;* description: Хранение файлов
;;*
;;**************************************************************************************************

(def files-root-directory "files_root_directory")

(defn save-file [tempfile dir filename]
  (let [dir-filename (str dir filename)
        full-path (str files-root-directory dir-filename)]
    (clojure.java.io/make-parents full-path)
    (with-open [in (clojure.java.io/input-stream tempfile)
                out (clojure.java.io/output-stream full-path)]

(ns ixinfestor.core

  (:use korma.db)
  (:use korma.core)
  (:use clojure.pprint)
