   [path]
   (-> path files/basename files/without-ext))
 
+(defn- add-ext
+  [path extname]
+  (if (empty? (files/ext path))
+    (str path extname)
+    path))
+
 (defn- load-project
   [path]
   (when (files/file? path)

(defn- add-items
  []
  (when (check-project-dir)
    (map #(hash-map :name (-> % files/basename files/without-ext)
                    :path %)
         (files/full-path-ls @project-directory))))


  [:input {:type "file" :nwsaveas (or path true)}]
  :change (fn []
            (this-as me
                     (let [path (-> me dom/val (add-ext ".edn"))]
                       (save path project)
                       (change-opened-project-path path)))))


;;;
