|
|
unsigned int geometry_width = 800; | unsigned int geometry_width = 800; |
unsigned int geometry_height = 600; | unsigned int geometry_height = 600; |
| |
|
#ifndef __WXMSW__ |
// catch fatal exceptions | // catch fatal exceptions |
wxHandleFatalExceptions(true); | wxHandleFatalExceptions(true); |
|
#endif |
| |
// Apprently needed for *BSD | // Apprently needed for *BSD |
SetResourceLimits(); | SetResourceLimits(); |
|
|
while ( entries ) { | while ( entries ) { |
if ( strncmp(entries->mnt_type, "vfat",4) == 0 ) { | if ( strncmp(entries->mnt_type, "vfat",4) == 0 ) { |
if ( tempdir.StartsWith( entries->mnt_dir ) ) { | if ( tempdir.StartsWith( entries->mnt_dir ) ) { |
amuledlg->AddLogLine(false, "Temp dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
printf("Temp dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
use_chmod = false; | use_chmod = false; |
} else if ( incomingdir.StartsWith( entries->mnt_dir ) ) { | } else if ( incomingdir.StartsWith( entries->mnt_dir ) ) { |
amuledlg->AddLogLine(false, "Incoming dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
printf("Incoming dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
use_chmod = false; | use_chmod = false; |
} | } |
} | } |
|
|
| |
fclose(mnt_tab); | fclose(mnt_tab); |
} | } |
#endif /*not __OPENBSD__ */ |
#else |
|
wxString incomingdir = glob_prefs->GetIncomingDir(); |
#ifdef __OPENBSD__ |
wxString tempdir = glob_prefs->GetTempDir(); |
wxString incomingdir = glob_prefs->GetIncomingDir(); |
long size, i; |
wxString tempdir = glob_prefs->GetTempDir(); |
struct statfs *mntbuf; |
long size, i; |
|
struct statfs *mntbuf; |
|
| |
size = getmntinfo(&mntbuf, MNT_NOWAIT); |
size = getmntinfo(&mntbuf, MNT_NOWAIT); |
for (i = 0; i < size; i++) { |
for (i = 0; i < size; i++) { |
if ( !strcmp(mntbuf[i].f_fstypename,"msdos")) |
if ( !strcmp(mntbuf[i].f_fstypename,"msdos")) { |
if ( tempdir.StartsWith( mntbuf[i].f_mntonname ) ) { |
if ( tempdir.StartsWith( mntbuf[i].f_mntonname ) ) { |
amuledlg->AddLogLine(false, "Temp dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
// Kry - We cannot addlogline because there's no GUI yet! |
|
printf("Temp dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
use_chmod = false; |
use_chmod = false; |
} else if ( incomingdir.StartsWith( mntbuf[i].f_mntonname ) ) { |
} else if ( incomingdir.StartsWith( mntbuf[i].f_mntonname ) ) { |
|
printf("Incoming dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
amuledlg->AddLogLine(false, "Incoming dir is placed on a FAT32 partition. Disabling chmod to avoid useless warnings."); |
use_chmod = false; |
|
} |
use_chmod = false; |
} |
} |
|
} | } |
| |
#endif // __OPENBSD__ | #endif // __OPENBSD__ |
|
|
delete[] amulesig_path; | delete[] amulesig_path; |
} //End Added By Bouc7 | } //End Added By Bouc7 |
| |
|
|
// Gracefully handle fatal exceptions and print backtrace if possible | // Gracefully handle fatal exceptions and print backtrace if possible |
void CamuleApp::OnFatalException() | void CamuleApp::OnFatalException() |
{ | { |
|
#ifndef __WXMSW__ |
// Close sockets first. | // Close sockets first. |
if ( listensocket ) | if ( listensocket ) |
listensocket->Destroy(); | listensocket->Destroy(); |
|
|
fprintf(stderr, "\nOOPS! - Seems like aMule crashed\n--== no BACKTRACE yet \n\n"); | fprintf(stderr, "\nOOPS! - Seems like aMule crashed\n--== no BACKTRACE yet \n\n"); |
#endif | #endif |
#endif | #endif |
|
#endif |
} | } |
| |
#define wxGTK_WINDOW 1 | #define wxGTK_WINDOW 1 |