about summary refs log tree commit homepage
path: root/bin/dtas-player
diff options
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-player
parent74804f4ccdcac362dc304c8d6dddd65a3dfcd226 (diff)
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-player')
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/dtas-player b/bin/dtas-player
index 0c2d53e..49a0445 100755
--- a/bin/dtas-player
+++ b/bin/dtas-player
@@ -4,10 +4,9 @@
 Thread.abort_on_exception = $stderr.sync = $stdout.sync = true
 require 'yaml'
 require 'dtas/player'
-sock = (ENV["DTAS_PLAYER_SOCK"] ||
-        File.expand_path("~/.dtas/player.sock")).b
+sock = (ENV["DTAS_PLAYER_SOCK"] || File.expand_path("~/.dtas/player.sock"))
 state = (ENV["DTAS_PLAYER_STATE"] ||
-         File.expand_path("~/.dtas/player_state.yml")).b
+         File.expand_path("~/.dtas/player_state.yml"))
 [ sock, state ].each do |file|
   dir = File.dirname(file)
   next if File.directory?(dir)