everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
* [PATCH] dtas-tl: reto: force ASCII-8BIT regexp match
@ 2023-07-03  1:11 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-07-03  1:11 UTC (permalink / raw)
  To: dtas-all

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.
---
 bin/dtas-tl | 4 ++--
 1 file 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 @@ def add_after(c, argv, last_id)
   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})


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-03  1:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03  1:11 [PATCH] dtas-tl: reto: force ASCII-8BIT regexp match Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).