summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--l10ntools/scripts/localize.pl2
-rw-r--r--l10ntools/source/directory.cxx23
2 files changed, 11 insertions, 14 deletions
diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 7a9d8beb6f15..0eb30bd90424 100644
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -488,7 +488,7 @@ sub collectfiles{
}else{
$command = $binpath."localize_sl";
}
- print $command;
+ print $command . "\n";
# -e
# if ( -x $command ){
if( $command ){
diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx
index a36f8bd2361f..c248ec38ca17 100644
--- a/l10ntools/source/directory.cxx
+++ b/l10ntools/source/directory.cxx
@@ -187,29 +187,26 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
struct stat statbuf2;
struct dirent *dirp;
DIR *dir;
- //int ret;
- //char *ptr;
if( sFullpath.getLength() < 1 ) return;
- rtl::OString sFullpathext = rtl::OUStringToOString( sFullpath , RTL_TEXTENCODING_UTF8 , sFullpath.getLength() ).getStr();
- //printf("%s\n",sFullpathext.getStr());
+ rtl::OString sFullpathext = rtl::OUStringToOString( sFullpath , RTL_TEXTENCODING_UTF8 );
const char* path = sFullpathext.getStr();
// stat
- if( stat( path , &statbuf ) < 0 ){ printf("warning: Can not stat %s" , path ); return; }// error }
+ if( stat( path , &statbuf ) < 0 ){ printf("warning: Can not stat %s" , path ); return; }
- if( S_ISDIR(statbuf.st_mode ) == 0 ) { return; }// error } return; // not dir
+ if( S_ISDIR(statbuf.st_mode ) == 0 ) { return; }
- if( (dir = opendir( path ) ) == NULL ) {printf("readerror 2 in %s \n",path); return; } // error } return; // error
+ if( (dir = opendir( path ) ) == NULL ) {printf("readerror 2 in %s \n",path); return; }
dirholder aHolder(dir);
- sFullpathext += rtl::OString( "/" );
-
const rtl::OString sDot ( "." ) ;
const rtl::OString sDDot( ".." );
- if ( chdir( path ) == -1 ) { printf("chdir error in %s \n",path); return; } // error
+ if ( chdir( path ) == -1 ) { printf("chdir error in %s \n",path); return; }
+
+ sFullpathext += rtl::OString( "/" );
while( ( dirp = readdir( dir ) ) != NULL )
{
@@ -225,7 +222,7 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
// stat new entry
if( lstat( sEntity.getStr() , &statbuf2 ) < 0 )
{
- printf("error on entry %s\n" , sEntity.getStr() ) ; // error
+ printf("error on entry %s\n" , sEntity.getStr() ) ;
continue;
}
@@ -261,8 +258,8 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
}
}
}
- if ( chdir( ".." ) == -1 ) { printf("chdir error in .. \n"); return; } // error
- if( aHolder.close() < 0 ) return ; // error
+ if ( chdir( ".." ) == -1 ) { printf("chdir error in .. \n"); return; }
+ if( aHolder.close() < 0 ) return ;
std::sort( aFileVec.begin() , aFileVec.end() , File::lessFile );
std::sort( aDirVec.begin() , aDirVec.end() , Directory::lessDir );