Railo
  1. Railo
  2. RAILO-2188

modify CFDirectory filter to use the new WildcardPatternFilter to support multiple values

    Details

    • Similar Issues:
      Show 10 results 

      Description

      when passing a string as a filter to cfdirectory, the current implementation uses the old wildcard filter which is limited to a single value.

      this can be easily improved by using the new WildcardPatternFilter (that was added to fix a similar problem with cfzip) which allows for multiple values.

        Activity

        Hide
        Michael Offner
        added a comment -

        Is this filter working exact the same way as the old one?

        Show
        Michael Offner
        added a comment - Is this filter working exact the same way as the old one?
        Hide
        Igal .
        added a comment -

        I replied this in the email but I guess that doesn't post the comment:

        yes, it takes a value like ".cfm" or "lib".

        it handles multi-asterisks and questions marks, so "/lib/.jar" and most importantly it takes multiple values (comma separated or semi-colon separated) so it can take "*.cfc, *.cfm, *.cfml" and handle it properly.

        also, it's more efficient as it doesn't use regex.

        I tested it with all of the combinations I could think of before we added it to the zip tag.

        Show
        Igal .
        added a comment - I replied this in the email but I guess that doesn't post the comment: yes, it takes a value like " .cfm" or "lib ". it handles multi-asterisks and questions marks, so " /lib/ .jar" and most importantly it takes multiple values (comma separated or semi-colon separated) so it can take "*.cfc, *.cfm, *.cfml" and handle it properly. also, it's more efficient as it doesn't use regex. I tested it with all of the combinations I could think of before we added it to the zip tag.
        Hide
        Igal .
        added a comment -

        I've fixed this but it will require a file-level merge once you pull #91 as they both modify railo.runtime.tag.Directory so I will update this after you pull #91.

        Show
        Igal .
        added a comment - I've fixed this but it will require a file-level merge once you pull #91 as they both modify railo.runtime.tag.Directory so I will update this after you pull #91.
        Hide
        Bruce Kirkpatrick
        added a comment -

        The old filter used to allow pipes. I just found this issue after upgrading to railo 4.1.011. I see that I can use comma separate filter instead of pipes and still use it. But if it is easy to support pipes, that may retain compatibility better.

        I.e. railo 4.0 supports this:
        filter="*js|*html|*css"

        railo 4.1 supports this instead:
        filter="*js,*html,*css"

        Show
        Bruce Kirkpatrick
        added a comment - The old filter used to allow pipes. I just found this issue after upgrading to railo 4.1.011. I see that I can use comma separate filter instead of pipes and still use it. But if it is easy to support pipes, that may retain compatibility better. I.e. railo 4.0 supports this: filter="*js|*html|*css" railo 4.1 supports this instead: filter="*js,*html,*css"
        Hide
        Michael Offner
        added a comment -

        Fyi you can also use closures as filters

        Show
        Michael Offner
        added a comment - Fyi you can also use closures as filters
        Hide
        Igal .
        added a comment -
        Show
        Igal .
        added a comment - see pull https://github.com/getrailo/railo/pull/198
        Hide
        Peter Jackson
        added a comment -

        Unfortunately, the use of commas and semi-colon for alternation causes problems because both are valid characters in file and directory names.

        Show
        Peter Jackson
        added a comment - Unfortunately, the use of commas and semi-colon for alternation causes problems because both are valid characters in file and directory names.

          People

          • Assignee:
            Igal .
            Reporter:
            Igal .
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: