Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-2256

FileCopyDetails.setMode() from within copy { from zipTree() eachFile { ... } } doesn't work

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Resolution: Fixed
  • Affects Version/s: 1.0-rc-1
  • Fix Version/s: None

Description

The following fails to correctly set the file mode on files ending with ".sh" in "archive.zip":

copy {
from zipTree("archive.zip")
eachFile {
if (it.getName().endsWith(".sh")) { it.setMode(0755) }
}
into "targetDir"
}

If the ".sh" files included in the ZIP are mode 0644, they get copied from the ZIP into "targetDir" as mode 0644, not mode 0755 as requested by the code in eachFile(). (Adding a println to the "if" condition in the eachFile closure shows that the files are getting correctly matched and having the setMode() method called, but this seems to have no effect on the copied files.)

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
René Gröschke made changes - 06/May/12 6:57 PM
Field Original Value New Value
Assignee René Gröschke [ breskeby ]
Pivotal Tracker Integration made changes - 14/May/12 3:20 AM
Status Open [ 1 ] In Progress [ 3 ]
Pivotal Tracker Integration made changes - 15/May/12 2:44 AM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Pivotal Tracker Integration made changes - 18/Jun/12 3:16 PM
Status Resolved [ 5 ] Closed [ 6 ]
Luke Daley made changes - 03/Jan/13 5:09 AM
Workflow jira with pivotal tracker [ 15672 ] jira with pivotal tracker (no resolved, only closed) [ 17669 ]
Luke Daley made changes - 04/Jan/13 5:10 AM
Status Closed [ 6 ] Resolved [ 5 ]
Workflow jira with pivotal tracker (no resolved, only closed) [ 17669 ] Copy of jira with pivotal tracker (no closed, only resolved) [ 20304 ]

People

  • Assignee:
    René Gröschke
    Reporter:
    Bob Glamm
Vote (0)
Watch (0)

Dates

  • Created:
    26/Apr/12 2:42 PM
    Updated:
    04/Jan/13 5:10 AM
    Resolved:
    15/May/12 2:44 AM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.