Modify

Ticket #243 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Delete task won't delete all files

Reported by: alexweb@… Owned by: hans
Priority: major Milestone: 2.4.0RC1
Component: phing-tasks-system Version: 2.3.0
Keywords: Cc:

Description

hi

I'm using cleanup target to delete all files and dirs inside ${phing.svncheckout.to} folder, but for some reason it won't delete all files&folders. This is my config:

<target name="cleanup">
    <echo msg="Trying to clean up checkout dir" />
    <delete includeemptydirs="true">
      <fileset dir="${phing.svncheckout.to}">
        <include name="**/**"/>
      </fileset>  
    </delete>
  </target>

This is -debug output:

[echo] Trying to clean up checkout dir
    -calling setter DeleteTask::setIncludeEmptyDirs()
Property ${phing.svncheckout.to} => /tmp/ftptest
    -calling setter AbstractFileSet::setDir()
    -calling setter PatternSetNameEntry::setName()
FileSet: Setup file scanner in dir /tmp/ftptest with patternSet{ includes: */  excludes: empty }

No errors, but

ls -la /tmp/ftptest
итого 1
drwxr-xr-x 13 alex alex 320 Апр 21 17:02 .
drwxrwxrwt 14 root root 488 Апр 21 17:01 ..
drwxr-xr-x  3 alex alex  72 Апр 21 17:02 .cache
drwxr-xr-x  3 alex alex  72 Апр 21 17:02 files
drwxr-xr-x  3 alex alex  72 Апр 21 17:02 includes
drwxr-xr-x  4 alex alex 104 Апр 21 17:02 misc
drwxr-xr-x 32 alex alex 784 Апр 21 15:36 modules
drwxr-xr-x  4 alex alex  96 Апр 21 15:36 profiles
drwxr-xr-x  3 alex alex  72 Апр 21 17:02 scripts
drwxr-xr-x  3 alex alex  72 Апр 21 17:02 .settings
drwxr-xr-x  5 alex alex 120 Апр 21 15:36 sites
drwxr-xr-x  6 alex alex 208 Апр 21 15:40 .svn
drwxr-xr-x  8 alex alex 216 Апр 21 15:36 themes

----
ls -la /tmp/ftptest/.svn
итого 9
drwxr-xr-x  6 alex alex  208 Апр 21 15:40 .
drwxr-xr-x 13 alex alex  320 Апр 21 17:02 ..
-r--r--r--  1 alex alex 2306 Апр 21 15:40 entries
-r--r--r--  1 alex alex    2 Апр 21 15:36 format
drwxr-xr-x  2 alex alex  424 Апр 21 15:36 prop-base
drwxr-xr-x  2 alex alex   48 Апр 21 15:36 props
drwxr-xr-x  2 alex alex  664 Апр 21 15:36 text-base
drwxr-xr-x  5 alex alex  136 Апр 21 15:40 tmp


As I can see it won't delete ALL folders and files. I've tried to use different include property: , /, /* - no luck.

Phing version 2.3.0 PEAR Version: 1.6.1 PHP Version: 5.2.5-3 Zend Engine Version: 2.2.0 Running on: Linux

Attachments

Change History

comment:1 Changed 3 years ago by Bruce Weirdan <weirdan@…>

Alex, there's 'defaultexcludes' attribute that you could specify on fileset tag:

<fileset dir="${phing.svncheckout.to}" defaultexcludes="false">

<include name=""/>

</fileset>

You might have better luck with this attribute specified.

comment:2 Changed 3 years ago by mrook

(In [464]) Refs #243 - mention 'defaultexcludes' attribute in documentation

comment:3 Changed 3 years ago by mrook

  • Status changed from new to closed
  • Resolution set to fixed

Bruce is correct - the 'defaultexcludes' attribute is now listed in the FileSet documentation.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.