Forum: Ruby Re: Find.find or Dirwith spaces in filenames?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3b7b8756d0c7f71cc7460cc33aefaee?d=identicon&s=25 Berger, Daniel (Guest)
on 2006-01-27 21:23
(Received via mailing list)
> -----Original Message-----
> From: Ezra Zygmuntowicz [mailto:ezmobius@gmail.com]
> Sent: Friday, January 27, 2006 1:03 PM
> To: ruby-talk ML
> Subject: Find.find or Dir[**/*] with spaces in filenames?

<snip>

>      @count_conv = 0
> 	    puts "Converted to #{@scale}x#{@scale} #{file}..."
>            end
>            @count_conv += 1
>          end
>        end
>      end
>      @log_file << "\n\n#{@count_conv} logos were converted to
> correctly sized gifs.\n\n\n"
>    end

This looks ok to me.  File.find yields files and directories with spaces
without any problem.  Perhaps the problem is with the "convert"
function.

The easiest workaround (if that's the case) is to rename the file before
passing it to convert, replacing spaces with underscores.

Otherwise, you'll have to be more specific about the error you're
getting.

Regards,

Dan
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-01-27 21:32
(Received via mailing list)
Daniel-

	Doh! Your of course correct. I wasn't looking in the right place to
see what I was doing. This will let me finish what I need to do.

Thanks
-Ezra
This topic is locked and can not be replied to.