summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-27 20:47:31 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-27 20:47:31 +0200
commit9e5584a82633442467a53ccc08c3380070178a38 (patch)
tree03ecad6d69523ff70217dd583ac757500135697d /l10ntools
parent9d4ec37cb09142515a5bc1fdc06beee1f8b0642a (diff)
parent73b79fe869dee44b26d79d9e448fa95544a375e7 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m106'
Conflicts: cppcanvas/source/mtfrenderer/implrenderer.cxx i18npool/inc/i18npool/lang.h i18npool/source/isolang/isolang.cxx svtools/source/filter/exportdialog.cxx svtools/source/graphic/grfmgr.cxx vcl/aqua/source/dtrans/aqua_service.cxx vcl/aqua/source/window/salframe.cxx vcl/inc/sft.hxx vcl/inc/unx/pspgraphics.h vcl/inc/vcl/cursor.hxx vcl/inc/vcl/gdimtf.hxx vcl/inc/vcl/settings.hxx vcl/prj/d.lst vcl/source/app/settings.cxx vcl/source/control/edit.cxx vcl/source/gdi/gdimtf.cxx vcl/source/window/cursor.cxx vcl/source/window/window.cxx vcl/unx/generic/fontmanager/fontconfig.cxx vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx vcl/unx/kde4/KDESalGraphics.cxx
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/directory.cxx33
1 files changed, 26 insertions, 7 deletions
diff --git a/l10ntools/source/directory.cxx b/l10ntools/source/directory.cxx
index fbb9bcd53c6f..97be7c2332fb 100644
--- a/l10ntools/source/directory.cxx
+++ b/l10ntools/source/directory.cxx
@@ -194,20 +194,33 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
if( sFullpath.getLength() < 1 ) return;
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; }
+ if( stat( sFullpathext.getStr(), &statbuf ) < 0 )
+ {
+ printf("warning: Can not stat %s" , sFullpathext.getStr() );
+ return;
+ }
+
+ if( S_ISDIR(statbuf.st_mode ) == 0 )
+ return;
- if( S_ISDIR(statbuf.st_mode ) == 0 ) { return; }
+ if( (dir = opendir( sFullpathext.getStr() ) ) == NULL )
+ {
+ printf("readerror 2 in %s \n",sFullpathext.getStr());
+ return;
+ }
- if( (dir = opendir( path ) ) == NULL ) {printf("readerror 2 in %s \n",path); return; }
dirholder aHolder(dir);
const rtl::OString sDot ( "." ) ;
const rtl::OString sDDot( ".." );
- if ( chdir( path ) == -1 ) { printf("chdir error in %s \n",path); return; }
+ if ( chdir( sFullpathext.getStr() ) == -1 )
+ {
+ printf("chdir error in %s \n",sFullpathext.getStr());
+ return;
+ }
sFullpathext += rtl::OString( "/" );
@@ -261,8 +274,14 @@ void Directory::readDirectory( const rtl::OUString& sFullpath )
}
}
}
- if ( chdir( ".." ) == -1 ) { printf("chdir error in .. \n"); return; }
- if( aHolder.close() < 0 ) return ;
+ 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 );