From: 7stud -- Date: 2009-02-05T10:19:06+09:00 Subject: Re: Dir.foreach() crash unknown wrote: > I am getting the following error: > > D:/BackupScripts/trimMachines.rb:130:in `open': Invalid argument - x:\. > \data\dubinin\vmap\v1180\soamafr\lib_180\trans\k\f\g\e (Errno::EINVAL) > > I've checked and the directory mentioned does exist, the user account > has full access to the directory, the directory is not empty, the > directory name is < 255 chars long, etc. > > This script works for millions of files with directories that have > much longer names and many more subdirectories than this example > failure. The failures happen routinely after a few days of running the > script and always on different directories. > > Does anyone have a clue what the problem could be? Is this a Ruby bug? Forward slashes are dangerous in strings because things like \v are escape characters? -- Posted via http://www.ruby-forum.com/.