From 5654c9bf58211e1fcec5f7553fa751066d7e6824 Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Wed, 18 Jul 2012 23:46:11 -0500 Subject: Make truncate not clobber :file-table. --- src/clojure/foofs/localbackend.clj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/clojure/foofs/localbackend.clj b/src/clojure/foofs/localbackend.clj index 7968d02..d15712b 100644 --- a/src/clojure/foofs/localbackend.clj +++ b/src/clojure/foofs/localbackend.clj @@ -394,10 +394,8 @@ (fn [state] (if (nil? (get-in state [:inode-table nodeid])) (do (continuation! errno-noent) state) - (let [file (get-in state [:file-table nodeid]) - state (assoc-in state [:inode-table nodeid :size] size) - state (assoc-in state [:file-table nodeid] - (take size (concat file (repeat (byte 0)))))] + (let [state (assoc-in state [:inode-table nodeid :size] size)] + ;; TODO truncate block-list (agent-do state-agent (continuation! nil)) state))))) (setatime [_ nodeid seconds nseconds continuation!] -- cgit v1.2.3-18-g5258