Mercurial > gftp.yaz
comparison lib/protocols.c @ 830:afbe37351940
2006-10-19 Brian Masney <masneyb@gftp.org>
WARNING: The CVS version of gFTP is currently broken, especially for
international users. This will be fixed in a few days.
* src/gtk/gtkui.c src/gtk/gtkui_transfer.c src/gtk/misc-gtk.c lib/gftp.h
lib/misc.c lib/protocols.c - removed code that converts the filename to
UTF8. This will be handled by the library. Removed utf8_file member from
the gftp_file structure.
* lib/rfc959.c - convert the file or directory from UTF8 to the proper
locale when sending a command to the server.
* src/uicommon/gftpui.c src/gtk/menu-items.c lib/misc.c lib/gftp.h
(gftp_gen_ls_string) - convert the filename from UTF8 to the proper
locale before it is displayed to the user.
author | masneyb |
---|---|
date | Thu, 19 Oct 2006 11:41:04 +0000 |
parents | 92ba2b1e144a |
children | f2772ac00751 |
comparison
equal
deleted
inserted
replaced
829:74f49d528c68 | 830:afbe37351940 |
---|---|
104 { | 104 { |
105 g_return_if_fail (file != NULL); | 105 g_return_if_fail (file != NULL); |
106 | 106 |
107 if (file->file) | 107 if (file->file) |
108 g_free (file->file); | 108 g_free (file->file); |
109 if (file->utf8_file) | |
110 g_free (file->utf8_file); | |
111 if (file->user) | 109 if (file->user) |
112 g_free (file->user); | 110 g_free (file->user); |
113 if (file->group) | 111 if (file->group) |
114 g_free (file->group); | 112 g_free (file->group); |
115 if (file->destfile) | 113 if (file->destfile) |
592 | 590 |
593 int | 591 int |
594 gftp_get_next_file (gftp_request * request, const char *filespec, | 592 gftp_get_next_file (gftp_request * request, const char *filespec, |
595 gftp_file * fle) | 593 gftp_file * fle) |
596 { | 594 { |
597 char *slashpos, *newfile; | 595 char *slashpos, *tmpfile, *utf8; |
598 int fd, ret; | 596 int fd, ret; |
599 | 597 |
600 g_return_val_if_fail (request != NULL, GFTP_EFATAL); | 598 g_return_val_if_fail (request != NULL, GFTP_EFATAL); |
601 | 599 |
602 if (request->get_next_file == NULL) | 600 if (request->get_next_file == NULL) |
619 gftp_file_destroy (fle, 0); | 617 gftp_file_destroy (fle, 0); |
620 continue; | 618 continue; |
621 } | 619 } |
622 | 620 |
623 *slashpos = '\0'; | 621 *slashpos = '\0'; |
624 newfile = g_strdup (slashpos + 1); | 622 tmpfile = g_strdup (slashpos + 1); |
625 | 623 |
626 if (strcmp (fle->file, request->directory) != 0) | 624 if (strcmp (fle->file, request->directory) != 0) |
627 request->logging_function (gftp_logging_error, request, | 625 request->logging_function (gftp_logging_error, request, |
628 _("Warning: Stripping path off of file '%s'. The stripped path (%s) doesn't match the current directory (%s)\n"), | 626 _("Warning: Stripping path off of file '%s'. The stripped path (%s) doesn't match the current directory (%s)\n"), |
629 newfile, fle->file, request->directory, | 627 tmpfile, fle->file, request->directory, |
630 g_strerror (errno)); | 628 g_strerror (errno)); |
631 | 629 |
632 g_free (fle->file); | 630 g_free (fle->file); |
633 fle->file = newfile; | 631 fle->file = tmpfile; |
634 } | 632 } |
635 | 633 |
636 if (ret >= 0 && fle->file != NULL) | 634 if (ret >= 0 && fle->file != NULL) |
637 fle->utf8_file = gftp_string_to_utf8 (request, fle->file); | 635 { |
636 utf8 = gftp_string_to_utf8 (request, fle->file); | |
637 if (utf8 != NULL) | |
638 { | |
639 tmpfile = fle->file; | |
640 fle->file = utf8; | |
641 g_free (tmpfile); | |
642 } | |
643 } | |
638 | 644 |
639 if (ret >= 0 && !request->cached && request->cachefd > 0 && | 645 if (ret >= 0 && !request->cached && request->cachefd > 0 && |
640 request->last_dir_entry != NULL) | 646 request->last_dir_entry != NULL) |
641 { | 647 { |
642 if (gftp_fd_write (request, request->last_dir_entry, | 648 if (gftp_fd_write (request, request->last_dir_entry, |