mirror of https://github.com/sbt/sbt.git
I ran into a couple of issues with the clean implementation. I changed the logging to print to stdout instead of streams if enabled. I also added a helper, Clean.deleteContents that recursively deletes all of the contents of a directory except for those that match the exclude filter parameter. Using a normal logger was a bad idea because we are actually deleting the target/streams directory when running clean. The previous implementation worked by getting the full list of files to delete, reverse sorting it and then deleting every element in the list. While this can work well it many circumstances, if the directory is still being written to during the recursive deletion, then we could miss files that were added after we fetched all of the files. The new version lazily lists the subdirectories as needed. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||