diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2015-03-13 12:58:31 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2015-03-13 12:58:31 -0700 |
commit | 9e310fbe067c48921761e223f9fd9602498f4a08 (patch) | |
tree | 34b2e400b6eff949a76cc1a1431ea6ad002ff2e6 /sesman/chansrv | |
parent | 4a6567c5a2fa7f14c5e52332c0be59a3c95225ed (diff) | |
download | xrdp-proprietary-9e310fbe067c48921761e223f9fd9602498f4a08.tar.gz xrdp-proprietary-9e310fbe067c48921761e223f9fd9602498f4a08.zip |
clipboard file paste, don't add new line to last line
Diffstat (limited to 'sesman/chansrv')
-rw-r--r-- | sesman/chansrv/clipboard_file.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sesman/chansrv/clipboard_file.c b/sesman/chansrv/clipboard_file.c index ff95b0a0..c1fb0909 100644 --- a/sesman/chansrv/clipboard_file.c +++ b/sesman/chansrv/clipboard_file.c @@ -626,6 +626,7 @@ clipboard_c2s_in_files(struct stream *s, char *file_list) int cItems; int lindex; int str_len; + int file_count; struct clip_file_desc *cfd; char *ptr; @@ -644,6 +645,7 @@ clipboard_c2s_in_files(struct stream *s, char *file_list) log_debug("clipboard_c2s_in_files: cItems %d", cItems); cfd = (struct clip_file_desc *) g_malloc(sizeof(struct clip_file_desc), 0); + file_count = 0; ptr = file_list; for (lindex = 0; lindex < cItems; lindex++) { @@ -658,6 +660,13 @@ clipboard_c2s_in_files(struct stream *s, char *file_list) } xfuse_add_clip_dir_item(cfd->cFileName, 0, cfd->fileSizeLow, lindex); + if (file_count > 0) + { + *ptr = '\n'; + ptr++; + } + file_count++; + g_strcpy(ptr, "file://"); ptr += 7; @@ -671,9 +680,6 @@ clipboard_c2s_in_files(struct stream *s, char *file_list) str_len = g_strlen(cfd->cFileName); g_strcpy(ptr, cfd->cFileName); ptr += str_len; - - *ptr = '\n'; - ptr++; } *ptr = 0; g_free(cfd); |