Skip to content

Commit

Permalink
Merge branch 'hotfix-1.3.3' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
sebduggan committed Jun 17, 2024
2 parents d0bf3b1 + 799d9b7 commit 308bad3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.3.3

* [#21](https://github.com/pixl8/sticker/issues/21) Explicitly define directoryList sort order

## 1.3.2

* [#19](https://github.com/pixl8/sticker/issues/19) Stop needlessly instantiating util component that can be a single instance

## 1.3.1

* [#17](https://github.com/pixl8/sticker/issues/17) Protect against unsanitized data output as js data
Expand Down
13 changes: 8 additions & 5 deletions sticker/util/Bundle.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,21 @@ component {
) {
var rootDir = ExpandPath( _getRootDirectory() );
var directory = rootDir;
var matches = "";

if ( Left( arguments.directory, 1 ) != "/" ) {
directory &= "/";
}
directory &= arguments.directory;

if ( DirectoryExists( directory ) ) {
var filter = IsSimpleValue( arguments.match ) ? arguments.match : "*";
matches = DirectoryList( directory, true, "path", filter );
for( var path in matches ){
var relativePath = Replace( Replace( path, rootDir, "" ), "\", "/", "all" );
var filter = IsSimpleValue( arguments.match ) ? arguments.match : "*";
var matches = DirectoryList( directory, true, "query", filter, "DateLastModified" );
var path = "";
var relativePath = "";

for( var file in matches ){
path = file.directory & "/" & file.name;
relativePath = Replace( Replace( path, rootDir, "" ), "\", "/", "all" );

if ( !IsClosure( arguments.match ) || arguments.match( relativePath ) ) {
addAsset(
Expand Down

0 comments on commit 308bad3

Please sign in to comment.