in reply to Execution hangs on File::Find
See ${^WIN32_SLOPPY_STAT}sub Get_FileList{ @files=(); @todel=(); ####### WORKAROUND START my $sloppy = ${^WIN32_SLOPPY_STAT}; ${^WIN32_SLOPPY_STAT} = 1; ####### WORKAROUND END find(sub {push @files,$File::Find::name if (-f $File::Find::name a +nd /\.*$/ and stat($File::Find::name)->mtime > $lastepoch);}, $indir) +; find(sub {push @todel,$File::Find::name if (-d $File::Find::name); + }, $indir); $lastepoch = time; #Update last execution time for the next run $logger->info("New execution time update: $lastepoch."); $proccount = scalar(@files); $logger->info("Found $proccount new files since last run."); ####### REVERT WORKAROUND ${^WIN32_SLOPPY_STAT} = $sloppy; ####### REVERT WORKAROUND END }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Execution hangs on File::Find
by Dallaylaen (Chaplain) on Dec 04, 2017 at 12:00 UTC | |
by jahero (Pilgrim) on Dec 04, 2017 at 12:28 UTC | |
Re^2: Execution hangs on File::Find
by colox (Sexton) on Dec 04, 2017 at 12:00 UTC | |
by jahero (Pilgrim) on Dec 04, 2017 at 12:36 UTC | |
by colox (Sexton) on Dec 04, 2017 at 13:17 UTC | |
by Eily (Monsignor) on Dec 04, 2017 at 13:34 UTC | |
by jahero (Pilgrim) on Dec 04, 2017 at 14:20 UTC | |
by colox (Sexton) on Dec 04, 2017 at 19:56 UTC | |
| |
by Anonymous Monk on Dec 04, 2017 at 12:28 UTC |