Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

V2.0.0 and path glob fix #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/asset_sync/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def get_local_files
end
log "Using: Directory Search of #{path}/#{self.config.assets_prefix}"
Dir.chdir(path) do
to_load = self.config.assets_prefix.present? ? "#{self.config.assets_prefix}/**/**" : '**/**'
# Using file join allows the asset_prefix to have a trailing slash without breaking the glob pattern.
to_load = self.config.assets_prefix.present? ? File.join(self.config.assets_prefix, '**', '*') : '**/*'
Dir[to_load]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/asset_sync/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module AssetSync
VERSION = "2.0.0"
VERSION = "2.0.0.1"
end