jlevy/repren

Nondestructive mode can create empty directories

jlevy opened this issue · 0 comments

jlevy commented

When using dry-run mode (-n), files won't be modified.

However, if we are renaming entire paths, the implementation of transform_file() temporarily creates the parent paths of the new, rewritten path as part of the dry run (to better reproduce real behavior, and because it counts matches).

This means it can leave behind new, empty directories.

This isn't a really big deal, but it's arguably a bug.