#NEWLINE# def match_preview( self , index , * args ) : #NEWLINE# #INDENT# if ( not self . p . cwdidx ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( ( not self . p . fileops . recursive ) and ( index . parent ( ) != self . p . cwdidx ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# target = helpers . splitpath_os ( self . p . get_path ( index ) ) #NEWLINE# if ( ( self . p . cwd in target [ 0 ] ) and ( target in self . p . targets ) ) : #NEWLINE# #INDENT# idx = self . p . targets . index ( target ) #NEWLINE# try : #NEWLINE# #INDENT# if ( ( target [ 1 ] + target [ 2 ] ) != self . p . previews [ idx ] [ 1 ] ) : #NEWLINE# #INDENT# for i in [ 'utf-8' , 'latin1' ] : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return self . p . previews [ idx ] [ 1 ] . decode ( i ) #NEWLINE# #UNINDENT# except UnicodeDecodeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# return self . p . previews [ idx ] [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return '\\1' #NEWLINE# #UNINDENT# #UNINDENT# except IndexError : #NEWLINE# #INDENT# return 'err'