Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#2845 closed patch (fixed)

mythvideo treeview directory structure glitch

Reported by: ric@… Owned by: Anduin Withers
Priority: minor Milestone: unknown
Component: mythvideo Version: head
Severity: medium Keywords: treeview dir_node
Cc: Ticket locked: no

Description

When mythvideo builds the treeview directory structure from metadata it looks for "/path/to/current/dir" in the next filepath. It should look for "/path/to/current/dir/" (including the end "/").

Example:

  /path/to/dir/file1
  /path/to/dir B/file2
  /path/to/dir B/file3

is parsed as

  /path/to/dir/file1
  /path/to/dir/B/file2
  /path/to/dir B/file3

Patch to solve the problem:

Index: mythvideo/mythvideo/videolist.cpp
===================================================================
--- mythvideo/mythvideo/videolist.cpp   (revision 12351)
+++ mythvideo/mythvideo/videolist.cpp   (working copy)
@@ -348,7 +348,7 @@
 
         if (hint)
         {
-            if (metadata->Filename().startsWith(hint->getFQPath()))
+            if (metadata->Filename().startsWith(hint->getFQPath() + "/"))
             {
                 start = hint;
                 insert_chunk =

Change History (2)

comment:1 Changed 13 years ago by Anduin Withers

Resolution: fixed
Status: newclosed

(In [12392]) Closes #2845

Thanks to ric for finding and patching this bug (which caused bad metadata trees to be built in some cases).

comment:2 Changed 13 years ago by Anduin Withers

(In [13366]) References #2845

Merge in [12392]

Original commit message:

Thanks to ric for finding and patching this bug (which caused bad metadata trees to be built in some cases).

Note: See TracTickets for help on using tickets.