about summary refs log tree commit homepage
path: root/bin/dtas-tl
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-08-16 23:38:05 +0000
committerEric Wong <e@80x24.org>2014-08-16 23:38:05 +0000
commita27a6623449d00af838ba87319454d92dc3014c0 (patch)
treebe689619cbd949685687634be902760b28a03460 /bin/dtas-tl
parent74804f4ccdcac362dc304c8d6dddd65a3dfcd226 (diff)
downloaddtas-a27a6623449d00af838ba87319454d92dc3014c0.tar.gz
This avoids compatibility problems as File.expand_path respects the
"filesystem" encoding of Ruby.  I'm not 100% sure this is correct,
as Ruby encoding support still confuses me, but this fixes a problem
where I attempted to add UTF-8 filename with non-US-ASCII characters
in it on ruby-trunk.
Diffstat (limited to 'bin/dtas-tl')
-rwxr-xr-xbin/dtas-tl4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dtas-tl b/bin/dtas-tl
index 6214ca9..6963108 100755
--- a/bin/dtas-tl
+++ b/bin/dtas-tl
@@ -31,7 +31,7 @@ when "clear"
 when "addhead"
   ARGV.shift
   ARGV.reverse.each do |path|
-    path = File.expand_path(path.b)
+    path = File.expand_path(path)
     res = c.req(%W(tl add #{path}))
     puts "#{path} #{res}"
   end
@@ -40,7 +40,7 @@ when "addtail"
   track_ids = get_track_ids(c)
   last_id = track_ids.pop
   ARGV.each do |path|
-    path = File.expand_path(path.b)
+    path = File.expand_path(path)
     req = %W(tl add #{path})
     req << last_id.to_s if last_id
     res = c.req(req)