Skip to content

Commit

Permalink
Merge pull request #137 from BrumfieldLabs/quote-paths-for-shell
Browse files Browse the repository at this point in the history
Quote paths to handle filenames with spaces for #136
  • Loading branch information
jcoyne authored Jan 17, 2024
2 parents ae1caaf + 2b9ca62 commit 694d052
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/services/riiif/image_magick_info_extractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(path)

def extract
height, width, format, channels = Riiif::CommandRunner.execute(
"#{external_command} -format '%h %w %m %[channels]' #{@path}[0]"
"#{external_command} -format '%h %w %m %[channels]' '#{@path}[0]'"
).split(' ')

{
Expand Down
2 changes: 1 addition & 1 deletion app/services/riiif/imagemagick_command_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def layer_spec
end

def input
" #{path}#{layer_spec}"
" '#{path}#{layer_spec}'"
end

# In cases where the input file has an alpha_channel but the transformation
Expand Down

0 comments on commit 694d052

Please sign in to comment.