diff options
author | Eric Wong <e@80x24.org> | 2015-12-20 02:01:38 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-12-20 02:38:47 +0000 |
commit | f0c68b38334e5cf19f53c2358c95971e737e2af6 (patch) | |
tree | 0795e51a8af2af7526924f8e518f8917e7c5af84 /lib/dtas/mlib.rb | |
parent | 27d50ef044ab66d77abdb9f5b94d7c568dad035f (diff) | |
download | dtas-f0c68b38334e5cf19f53c2358c95971e737e2af6.tar.gz |
We cannot use "dirname" in queries, oops :x
Diffstat (limited to 'lib/dtas/mlib.rb')
-rw-r--r-- | lib/dtas/mlib.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dtas/mlib.rb b/lib/dtas/mlib.rb index 0d2f70c..9160567 100644 --- a/lib/dtas/mlib.rb +++ b/lib/dtas/mlib.rb @@ -212,9 +212,13 @@ class DTAS::Mlib # :nodoc: q = { parent_id: 1, # self name: '', - dirname: '', } - node = @db[:nodes][q] and return (@root_node = node) + node = @db[:nodes][q] + if node + node[:dirname] = '' + @root_node = node + return node + end begin q[:tlen] = DM_DIR q[:id] = @db[:nodes].insert(q) |