- m_permissions.Printf(_T("%c%c%c%c%c%c%c%c%c"),
- buff.st_mode & wxS_IRUSR ? _T('r') : _T('-'),
- buff.st_mode & wxS_IWUSR ? _T('w') : _T('-'),
- buff.st_mode & wxS_IXUSR ? _T('x') : _T('-'),
- buff.st_mode & wxS_IRGRP ? _T('r') : _T('-'),
- buff.st_mode & wxS_IWGRP ? _T('w') : _T('-'),
- buff.st_mode & wxS_IXGRP ? _T('x') : _T('-'),
- buff.st_mode & wxS_IROTH ? _T('r') : _T('-'),
- buff.st_mode & wxS_IWOTH ? _T('w') : _T('-'),
- buff.st_mode & wxS_IXOTH ? _T('x') : _T('-'));
+ if ( hasStat )
+ {
+ m_permissions.Printf(wxT("%c%c%c%c%c%c%c%c%c"),
+ buff.st_mode & wxS_IRUSR ? wxT('r') : wxT('-'),
+ buff.st_mode & wxS_IWUSR ? wxT('w') : wxT('-'),
+ buff.st_mode & wxS_IXUSR ? wxT('x') : wxT('-'),
+ buff.st_mode & wxS_IRGRP ? wxT('r') : wxT('-'),
+ buff.st_mode & wxS_IWGRP ? wxT('w') : wxT('-'),
+ buff.st_mode & wxS_IXGRP ? wxT('x') : wxT('-'),
+ buff.st_mode & wxS_IROTH ? wxT('r') : wxT('-'),
+ buff.st_mode & wxS_IWOTH ? wxT('w') : wxT('-'),
+ buff.st_mode & wxS_IXOTH ? wxT('x') : wxT('-'));
+ }