Summary: | warn if <delete task contains a fileset AND a dir attribute!! The content of dir is deleted before fileset's exclude is evaluated!!! | ||
---|---|---|---|
Product: | Ant | Reporter: | Ralf Hauser <hauser> |
Component: | Core | Assignee: | Ant Notifications List <notifications> |
Status: | NEW --- | ||
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 1.6.0 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other | ||
URL: | http://ant.apache.org/manual/CoreTasks/delete.html |
Description
Ralf Hauser
2003-10-13 17:02:43 UTC
It is perfectly legal to use both the attribute and nested filesets, a warning may even be annoying for users that do so on purpose. under the "fail-safe" principle, how about warning anyway and have for this delicate task "delete" a *expert* flag that suppresses the warnings! From the manual entry for the dir atribute: The directory to delete, including all its files and subdirectories. Note: dir is not used to specify a directory name for file; file and dir are independent of each other. WARNING: Do not set dir to ".", "${basedir}", or the full-pathname equivalent unless you truly intend to recursively remove the entire contents of the current base directory (and the base directory itself, if different from the current working directory). Granted, it doesn't say that dir is independant of the filesets, but since filesets have their own dir atribute it isn't that supprising. I'd say perhaps clarify in the manual at most. But I think the current entry is fairly clear, so maybe not even that. |