ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48058] tar task looses file permissions
Date Tue, 27 Oct 2009 17:44:38 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48058

Stefan Bodewig <bodewig@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Stefan Bodewig <bodewig@apache.org> 2009-10-27 10:44:36 UTC ---
There are many facets to this and I'll sure miss some:

* tar supports non-File resources as well, which do not provide said
information at all

* canRead and friends will give you information about the current user, is that
the owner, a group member or "other"?

* canExecute is Java6 and beyond, Ant's svn trunk targets Java 1.4.  For a long
time Java's file API has simply been insufficient and was the reason Ant didn't
even try to deduce permissions - and it still mostly is, in particular when you
take Ant's conservative compatibility requirements into account.

* canExecute most likely returns false for directories (haven't tried) and
canRead/Write likely show something different from Unix permissions for
directories as well - so we'd need special handling for dirs.

* checking the permissions for all files is likely a time-consuming operation,
java.io.File isn't exactly known for its efficient implementation.

Initially Ant didn't support storing permissions at all and when it started to
do so, it only was with the help of tarfileset/zipfileset.

The documentation doesn't say you won't get proper permissions directly, but it
could be derived from the paragraph starting with "In addition to the implicit
fileset" - but this may be a stretch.  svn revision 830262 improves the
situation a bit.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message