 (defn delete-store
   "Permanently deletes the folder of the store with all files."
   [folder]
-  (let [f (io/file folder)]
-    (doseq [c (.list f)]
-      (.delete (io/file (str folder "/" c))))
-    (.delete f)
-    (try
-      (sync-folder folder)
-      (catch Exception e
-        nil))))
+  (let [f (io/file folder)
+        parent-folder (.getParent f)]
+      (doseq [path [(str folder "/meta") (str folder "/data") folder]]
+        (doseq [c (.list (io/file path))]
+          (.delete (io/file (str path "/" c)))))
+      (.delete f)
+      (try
+        (sync-folder parent-folder)
+        (catch Exception e
+          nil))))
 
 (defn list-keys
   "Lists all keys in this binary store. This operation *does not block concurrent operations* and might return an outdated key set. Keys of binary blobs are not tracked atm."


  store




  store
  (->> (io/file "/tmp/konserve-fs-migration-test")

                               :key       key
                               :exception e}))))))

(defn- read-binary-old [f folder fn key locked-cb]
  (let [res-ch-old (chan)]
    (try
      (let [ac (AsynchronousFileChannel/open (.getPath (FileSystems/getDefault)
