Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/106#discussion_r15812176
  
    --- Diff: core/src/main/java/brooklyn/util/file/ArchiveBuilder.java ---
    @@ -178,28 +175,32 @@ public ArchiveBuilder add(File file) {
         }
     
         /**
    -     * Add the file located at the {@code filePath}, relative to the 
{@code baseDir},
    +     * Add the file located at the {@code fileSubPath}, relative to the 
{@code baseDir} on the local system,
          * to the archive.
          * <p>
    -     * Uses the {@code filePath} as the name of the file in the archive. 
Note that the
    -     * file is found by concatenating the two path components using {@link 
Os#mergePaths(String...)}
    -     * which may not behave as expected if the {@code filePath} is 
absolute or points to
    -     * a location above the current directory.
    +     * Uses the {@code fileSubPath} as the name of the file in the 
archive. Note that the
    +     * file is found by concatenating the two path components using {@link 
Os#mergePaths(String...)},
    +     * thus {@code fileSubPath} should not be absolute or point to a 
location above the current directory.
          * <p>
          * Use {@link #entry(String, String)} directly or {@link 
#entries(Map)} for complete
          * control over file locations and names in the archive.
          *
          * @see #entry(String, String)
          */
    -    public ArchiveBuilder addRelativeToBaseDir(String baseDir, String 
filePath) {
    +    public ArchiveBuilder addFromLocalBaseDir(File baseDir, String 
fileSubPath) {
    --- End diff --
    
    i think it's okay `entry` having a different signature to `add*` as the 
latter is meant to be caller-centric whereas `entry` is more zip-centric.  all 
local items are referred to as `File` to prevent confusion now.  open to 
suggestions however.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to