dtas-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/1] tracklist: do not mutate @list when serializing


From: Eric Wong
Subject: [PATCH 2/1] tracklist: do not mutate @list when serializing
Date: Sat, 5 Dec 2015 05:46:52 +0000

This happens when "dtas-ctl state dump" is invoked manually;
causing "dtas-tl cat" to break afterwards.

Fixes: commit 7b065706d37df9e54c8b3299ce696545c6159fa4
       ("tracklist: use lower number unique track IDs")
---
 lib/dtas/tracklist.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb
index 696026a..1750f26 100644
--- a/lib/dtas/tracklist.rb
+++ b/lib/dtas/tracklist.rb
@@ -30,7 +30,7 @@ class DTAS::Tracklist # :nodoc:
   def to_hsh
     h = ivars_to_hash(SIVS)
     h.delete_if { |k,v| TL_DEFAULTS[k] == v }
-    list = h['list'] and list.map!(&:to_path)
+    list = h['list'] and h['list'] = list.map(&:to_path)
     h
   end
 
-- 
EW



reply via email to

[Prev in Thread] Current Thread [Next in Thread]