summaryrefslogtreecommitdiffstats
path: root/libvncserver/tightvnc-filetransfer/filetransfermsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver/tightvnc-filetransfer/filetransfermsg.c')
-rw-r--r--libvncserver/tightvnc-filetransfer/filetransfermsg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libvncserver/tightvnc-filetransfer/filetransfermsg.c b/libvncserver/tightvnc-filetransfer/filetransfermsg.c
index a0d7a5e..3cda84a 100644
--- a/libvncserver/tightvnc-filetransfer/filetransfermsg.c
+++ b/libvncserver/tightvnc-filetransfer/filetransfermsg.c
@@ -109,8 +109,12 @@ CreateFileListInfo(FileListInfoPtr pFileListInfo, char* path, int flag)
{
DIR* pDir = NULL;
struct dirent* pDirent = NULL;
-
- if((path == NULL) || (strlen(path) == 0)) {
+
+ if(path == NULL) {
+ return FAILURE;
+ }
+
+ if(strlen(path) == 0) {
/* In this case we will send the list of entries in ftp root*/
sprintf(path, "%s%s", GetFtpRoot(), "/");
}