Skip to content

Commit 9233798

Browse files
committed
package.py - Log directories with ending /
1 parent 1bf443c commit 9233798

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

package.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,11 @@ def _write_file(self, file_path, prefix=None, name=None, timestamp=None):
338338
arcname = name if name else os.path.basename(file_path)
339339
if prefix:
340340
arcname = os.path.join(prefix, arcname)
341-
self._log.info("adding: %s", arcname)
342341
zinfo = self._make_zinfo_from_file(file_path, arcname)
342+
if zinfo.is_dir():
343+
self._log.info("adding: %s/", arcname)
344+
else:
345+
self._log.info("adding: %s", arcname)
343346
if timestamp is None:
344347
timestamp = self.timestamp
345348
date_time = self._timestamp_to_date_time(timestamp)
@@ -556,13 +559,13 @@ def emit_dir(dpath, opath):
556559
if apply(dpath):
557560
yield opath
558561
else:
559-
self._log.info('skip dir: %s', opath)
562+
self._log.debug('skip: %s', dpath)
560563

561564
def emit_file(fpath, opath):
562565
if apply(fpath):
563566
yield opath
564567
else:
565-
self._log.info('skip file: %s', opath)
568+
self._log.debug('skip: %s', fpath)
566569

567570
if os.path.isfile(path):
568571
name = os.path.basename(path)

0 commit comments

Comments
 (0)