File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -209,14 +209,12 @@ def __hash__(self):
209209        try :
210210            return  self ._hash 
211211        except  AttributeError :
212-             hash_data  =  self ._tail 
213-             if  self ._drv  or  self ._root :
214-                 hash_data  =  [self ._drv  +  self ._root ] +  self ._tail 
215-             elif  self ._tail  and  self .parser .splitdrive (self ._tail [0 ])[0 ]:
216-                 hash_data  =  ['.' ] +  self ._tail 
217-             if  self .parser  is  not   posixpath :
218-                 hash_data  =  [part .lower () for  part  in  hash_data ]
219-             self ._hash  =  hash (tuple (hash_data ))
212+             if  self .parser  is  posixpath :
213+                 self ._hash  =  hash ((self .root , tuple (self ._tail )))
214+             else :
215+                 self ._hash  =  hash ((self .drive .lower (),
216+                                    self .root .lower (),
217+                                    tuple ([part .lower () for  part  in  self ._tail ])))
220218            return  self ._hash 
221219
222220    def  __eq__ (self , other ):
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments