in reply to Re: File::Copy dying on Win2k when target file already there
in thread File::Copy dying on Win2k when target file already there
copy($localfile, $installfile) or die "$localfile unable to copy to $installfile : $!\n";
That said, demerphq helped me track down the problem. The problematic files where read-only, and apparently File::Copy won't let you copy over read-only files (even if you are the Administrator). I modified the code to add lines like this:
fixreadonly($plugindir) if $^O =~ /win32/i; sub fixreadonly { my $dir = shift; my $unsetreadonly = Bio::Root::IO->catfile( $dir, "*.*"); system("attrib -r /s $unsetreadonly"); }
Scott
Project coordinator of the Generic Model Organism Database Project
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: File::Copy dying on Win2k when target file already there
by John M. Dlugosz (Monsignor) on Jan 17, 2003 at 02:30 UTC | |
by scain (Curate) on Jan 17, 2003 at 15:58 UTC | |
by John M. Dlugosz (Monsignor) on Jan 17, 2003 at 16:48 UTC | |
by Aristotle (Chancellor) on Jan 18, 2003 at 15:33 UTC |