@@ -1664,7 +1664,7 @@ def local_file_stat(file, fstat, opt, logact):
16641664 if opt & 8 :
16651665 info ['gid' ] = fstat .st_gid
16661666 info ['group' ] = grp .getgrgid (info ['gid' ]).gr_name
1667- if opt & 32 : info ['checksum' ] = get_md5sum (file , 0 , logact )
1667+ if opt & 32 and info [ 'isfile' ] : info ['checksum' ] = get_md5sum (file , 0 , logact )
16681668
16691669 return info
16701670
@@ -2305,16 +2305,18 @@ def get_md5sum(file, count = 0, logact = 0):
23052305 if count > 0 :
23062306 checksum = [None ]* count
23072307 for i in range (count ):
2308- chksm = PgLOG .pgsystem (cmd + file [i ], logact , 20 )
2309- if chksm :
2310- ms = re .search (r'(\w{32})' , chksm )
2311- if ms : checksum [i ] = ms .group (1 )
2308+ if op .isfile (file [i ]):
2309+ chksm = PgLOG .pgsystem (cmd + file [i ], logact , 20 )
2310+ if chksm :
2311+ ms = re .search (r'(\w{32})' , chksm )
2312+ if ms : checksum [i ] = ms .group (1 )
23122313 else :
2313- chksm = PgLOG .pgsystem (cmd + file , logact , 20 )
23142314 checksum = None
2315- if chksm :
2316- ms = re .search (r'(\w{32})' , chksm )
2317- if ms : checksum = ms .group (1 )
2315+ if op .isfile (file ):
2316+ chksm = PgLOG .pgsystem (cmd + file , logact , 20 )
2317+ if chksm :
2318+ ms = re .search (r'(\w{32})' , chksm )
2319+ if ms : checksum = ms .group (1 )
23182320
23192321 return checksum
23202322
0 commit comments