Skip to content

Commit

Permalink
fix renaming folder with non-utf8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
squentin committed Apr 20, 2012
1 parent 679ce48 commit b1482ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gmusicbrowser.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6159,7 +6159,9 @@ sub MoveFolder #FIXME implement
sub UpdateFolderNames
{ my ($oldpath,$newpath)=@_;
s/$QSLASH+$//o for $oldpath,$newpath;
my $renamed=Songs::AllFilter('path:i:'.$oldpath);
my $filter= 'path:i:'.Songs::filename_escape($oldpath);
utf8::upgrade($filter); #for unclear reasons, it is needed for non-utf8 folder names. Things should be clearer once the filter code is changed to keep patterns in variables, instead of including them in the eval
my $renamed=Songs::AllFilter($filter);

my $pattern=qr/^\Q$oldpath\E/;
my @newpath;
Expand Down

0 comments on commit b1482ff

Please sign in to comment.