Browse Subversion Repository
Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ssh.c
Parent Directory
| Revision Log
| Patch
| 3754 |
} |
} |
| 3755 |
|
|
| 3756 |
if (_access(c->scp.localfilefull, 0x00) == 0) { |
if (_access(c->scp.localfilefull, 0x00) == 0) { |
| 3757 |
char buf[80]; |
char buf[512]; |
| 3758 |
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "`%s' file exists. (%d)", c->scp.localfilefull, GetLastError()); |
int dlgresult; |
| 3759 |
MessageBox(NULL, buf, "TTSSH: file error", MB_OK | MB_ICONERROR); |
if (_access(c->scp.localfilefull, 0x02) == -1) { // 0x02 == writable |
| 3760 |
goto error; |
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "`%s' file is read only.", c->scp.localfilefull); |
| 3761 |
|
MessageBox(NULL, buf, "TTSSH: file open error", MB_OK | MB_ICONERROR); |
| 3762 |
|
goto error; |
| 3763 |
|
} |
| 3764 |
|
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "`%s' file exists. (%d)\noverwrite it?", c->scp.localfilefull, GetLastError()); |
| 3765 |
|
dlgresult = MessageBox(NULL, buf, "TTSSH: confirm", MB_YESNO | MB_ICONERROR); |
| 3766 |
|
if (dlgresult == IDNO) { |
| 3767 |
|
goto error; |
| 3768 |
|
} |
| 3769 |
} |
} |
| 3770 |
|
|
| 3771 |
fp = fopen(c->scp.localfilefull, "wb"); |
fp = fopen(c->scp.localfilefull, "wb"); |
| 3772 |
if (fp == NULL) { |
if (fp == NULL) { |
| 3773 |
char buf[80]; |
char buf[512]; |
| 3774 |
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "fopen: %d", GetLastError()); |
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "fopen: %d", GetLastError()); |
| 3775 |
MessageBox(NULL, buf, "TTSSH: file open write error", MB_OK | MB_ICONERROR); |
MessageBox(NULL, buf, "TTSSH: file open write error", MB_OK | MB_ICONERROR); |
| 3776 |
goto error; |
goto error; |
|
|
Legend:
| Removed from v.3375 |
|
| changed lines |
| |
Added in v.3376 |
|
|
| |