Merging upstream version 1.4~pre2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
454cd28d9e
commit
06e5e699b7
30 changed files with 802 additions and 552 deletions
11
recursive.cc
11
recursive.cc
|
@ -1,5 +1,5 @@
|
|||
/* Zutils - Utilities dealing with compressed files
|
||||
Copyright (C) 2009-2014 Antonio Diaz Diaz.
|
||||
Copyright (C) 2009-2015 Antonio Diaz Diaz.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -46,9 +46,12 @@ bool next_filename( std::list< std::string > & filenames,
|
|||
{
|
||||
const struct dirent * const entryp = readdir( dirp );
|
||||
if( !entryp ) { closedir( dirp ); break; }
|
||||
std::string tmp_name( entryp->d_name );
|
||||
if( tmp_name != "." && tmp_name != ".." )
|
||||
tmp_list.push_back( input_filename + "/" + tmp_name );
|
||||
const std::string tmp_name( entryp->d_name );
|
||||
if( tmp_name == "." || tmp_name == ".." ) continue;
|
||||
const std::string full_name( input_filename + "/" + tmp_name );
|
||||
if( enabled_format( extension_format( extension_index( tmp_name ) ) ) ||
|
||||
( stat( full_name.c_str(), &st ) == 0 && S_ISDIR( st.st_mode ) ) )
|
||||
tmp_list.push_back( full_name );
|
||||
}
|
||||
filenames.splice( filenames.begin(), tmp_list );
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue