about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-07-03 01:11:26 +0000
committerEric Wong <e@80x24.org>2023-07-03 02:06:56 +0000
commitfda2a448452165b33eeee06f2b646d68749e5f00 (patch)
treea66734fd95f647071fa7e82d94d5ae79321ce4ec
parent33532b881366989864c9b30fffe046859561bc17 (diff)
downloaddtas-fda2a448452165b33eeee06f2b646d68749e5f00.tar.gz
POSIX path names aren't guaranteed to be UTF-8, and dtas should
be capable of playing non-UTF-8 path names from read-only legacy
FSes.
-rwxr-xr-xbin/dtas-tl4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dtas-tl b/bin/dtas-tl
index 66e0612..c7f4c83 100755
--- a/bin/dtas-tl
+++ b/bin/dtas-tl
@@ -188,9 +188,9 @@ when "reto"
   re = ARGV[1]
   time = ARGV[2]
   re = Regexp.quote(re) if fixed
-  re = ignorecase ? %r{#{re}}i : %r{#{re}}
+  re = ignorecase ? %r{#{re}}in : %r{#{re}}n
   each_track(c) do |line|
-    line.sub!(/\A(\d+)=/, '')
+    line.sub!(/\A(\d+)=/n, '') or abort "unexpected line=#{line.inspect}\n"
     track_id = $1
     if re =~ line
       req = %W(tl goto #{track_id})