From: Jim Weirich Date: 2004-06-20T13:13:58+09:00 Subject: Re: Problems with Rake Jim Weirich wrote: > Charles Comstock wrote: > >> No task creates ~ files in my rakefile, however, if my editor leaves ~ >> backup files strewn about the directory, rake attempts to make >> automatic tasks to recreate or process these ~ files. > > > Can I see an example rakefile that does this? Just a quick update in case anyone is interested. Charles sent me his Rakefile. It was using Dir.glob('**/*') to build a list of files to be put into a package. The glob runs before the clean task executes, so all the tilde files in the directory were included in the packaging list. Then the clean task ran deleting all the tilde files. Finally the package task ran, and it wanted to rebuild the tilde files (because they were in the package list). The solution was to exclude the tilde files from the package list. They could be explicitly removed, or use a Rake::FileList object to build the package list. FileLists are smart enough to deal with tilde files and other common temporary files. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)