- 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('-'));
+ 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('-'));
+ }