So far this hasn't been an issue as each user of dir2text wanted files
with a specific pattern. But if we want every file in the directory, we
need to skip the special files '.' and '..'.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
my $text = '';
PVE::Tools::dir_glob_foreach($target_dir, $regexp, sub {
my ($file) = @_;
+ return if $file eq '.' || $file eq '..';
$text .= "\n# cat $target_dir$file\n";
$text .= PVE::Tools::file_get_contents($target_dir.$file)."\n";
});