rpms/filezilla/F-8 FileZilla_3.0.3-backport.patch, NONE, 1.1 filezilla.spec, 1.3, 1.4

Chauvet (kwizart) fedora-extras-commits at redhat.com
Wed Nov 7 15:06:22 UTC 2007


Author: kwizart

Update of /cvs/pkgs/rpms/filezilla/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22580

Modified Files:
	filezilla.spec 
Added Files:
	FileZilla_3.0.3-backport.patch 
Log Message:
Backport fixes from 3.0.3


FileZilla_3.0.3-backport.patch:

--- NEW FILE FileZilla_3.0.3-backport.patch ---
diff -up filezilla-3.0.2.1/src/engine/ControlSocket.h.backport filezilla-3.0.2.1/src/engine/ControlSocket.h
--- filezilla-3.0.2.1/src/engine/ControlSocket.h.backport	2007-10-17 20:22:27.000000000 +0200
+++ filezilla-3.0.2.1/src/engine/ControlSocket.h	2007-11-07 16:00:18.000000000 +0100
@@ -135,7 +135,7 @@ public:
 	wxString ConvToLocal(const char* buffer);
 	wxChar* ConvToLocalBuffer(const char* buffer);
 	wxChar* ConvToLocalBuffer(const char* buffer, wxMBConv& conv);
-	wxCharBuffer ConvToServer(const wxString& str);
+	wxCharBuffer ConvToServer(const wxString& str, bool force_utf8 = false);
 
 	// ---
 	// The following two functions control the timeout behaviour:
diff -up filezilla-3.0.2.1/src/engine/ControlSocket.cpp.backport filezilla-3.0.2.1/src/engine/ControlSocket.cpp
--- filezilla-3.0.2.1/src/engine/ControlSocket.cpp.backport	2007-10-17 20:22:27.000000000 +0200
+++ filezilla-3.0.2.1/src/engine/ControlSocket.cpp	2007-11-07 16:00:18.000000000 +0100
@@ -543,9 +543,9 @@ wxChar* CControlSocket::ConvToLocalBuffe
 	return res;
 }
 
-wxCharBuffer CControlSocket::ConvToServer(const wxString& str)
+wxCharBuffer CControlSocket::ConvToServer(const wxString& str, bool force_utf8 /*=false*/)
 {
-	if (m_useUTF8)
+	if (m_useUTF8 || force_utf8)
 	{
 #if wxUSE_UNICODE
 		wxCharBuffer buffer = wxConvUTF8.cWX2MB(str);
@@ -556,7 +556,7 @@ wxCharBuffer CControlSocket::ConvToServe
 			 buffer = wxConvUTF8.cWC2MB(unicode);
 #endif
 
-		if (buffer)
+		if (buffer || force_utf8)
 			return buffer;
 	}
 
diff -up filezilla-3.0.2.1/src/engine/sftpcontrolsocket.cpp.backport filezilla-3.0.2.1/src/engine/sftpcontrolsocket.cpp
--- filezilla-3.0.2.1/src/engine/sftpcontrolsocket.cpp.backport	2007-11-07 16:00:18.000000000 +0100
+++ filezilla-3.0.2.1/src/engine/sftpcontrolsocket.cpp	2007-11-07 16:00:18.000000000 +0100
@@ -319,6 +319,19 @@ int CSftpControlSocket::Connect(const CS
 	LogMessage(Status, _("Connecting to %s:%d..."), server.GetHost().c_str(), server.GetPort());
 	SetWait(true);
 
+	delete m_pCSConv;
+	if (server.GetEncodingType() == ENCODING_CUSTOM)
+	{
+		m_pCSConv = new wxCSConv(server.GetCustomEncoding());
+		m_useUTF8 = false;
+	}
+	else
+	{
+		m_pCSConv = 0;
+		m_useUTF8 = true;
+	}
+
+
 	if (m_pCurrentServer)
 		delete m_pCurrentServer;
 	m_pCurrentServer = new CServer(server);
@@ -577,9 +590,10 @@ bool CSftpControlSocket::Send(wxString c
 	return AddToStream(cmd);
 }
 
-bool CSftpControlSocket::AddToStream(const wxString& cmd)
+bool CSftpControlSocket::AddToStream(const wxString& cmd, bool force_utf8 /*=false*/)
 {
-	const wxCharBuffer str = ConvToServer(cmd);
+	const wxCharBuffer str = ConvToServer(cmd, force_utf8);
+	
 	if (!m_pProcess)
 		return false;
 
@@ -1537,24 +1551,42 @@ int CSftpControlSocket::FileTransferSend
 		InitTransferStatus(pData->remoteFileSize, pData->resume ? pData->localFileSize : 0, false);
 		cmd += _T("get ");
 		cmd += QuoteFilename(pData->remotePath.FormatFilename(pData->remoteFile, !pData->tryAbsolutePath)) + _T(" ");
-		cmd += QuoteFilename(pData->localFile);
+
+		wxString localFile = QuoteFilename(pData->localFile);
+		wxString logstr = cmd;
+		logstr += localFile;
+		LogMessageRaw(Command, logstr);
+
+		if (!AddToStream(cmd) || !AddToStream(localFile + _T("\n"), true))
+		{
+			ResetOperation(FZ_REPLY_ERROR);
+			return FZ_REPLY_ERROR;
+		}
 	}
 	else
 	{
 		InitTransferStatus(pData->localFileSize, pData->resume ? pData->remoteFileSize : 0, false);
 		cmd += _T("put ");
-		cmd += QuoteFilename(pData->localFile) + _T(" ");
-		cmd += QuoteFilename(pData->remotePath.FormatFilename(pData->remoteFile, !pData->tryAbsolutePath));
+
+		wxString logstr = cmd;
+		wxString localFile = QuoteFilename(pData->localFile) + _T(" ");
+		wxString remoteFile = QuoteFilename(pData->remotePath.FormatFilename(pData->remoteFile, !pData->tryAbsolutePath));
+		
+		logstr += localFile;
+		logstr += remoteFile;
+		LogMessageRaw(Command, logstr);
+
+		if (!AddToStream(cmd) || !AddToStream(localFile, true) ||
+			!AddToStream(remoteFile + _T("\n")))
+		{
+			ResetOperation(FZ_REPLY_ERROR);
+			return FZ_REPLY_ERROR;
+		}
 	}
 	SetTransferStatusStartTime();
 
 	pData->transferInitiated = true;
-	if (!Send(cmd))
-	{
-		ResetOperation(FZ_REPLY_ERROR);
-		return FZ_REPLY_ERROR;
-	}
-
+	
 	return FZ_REPLY_WOULDBLOCK;
 }
 
diff -up filezilla-3.0.2.1/src/engine/sftpcontrolsocket.h.backport filezilla-3.0.2.1/src/engine/sftpcontrolsocket.h
--- filezilla-3.0.2.1/src/engine/sftpcontrolsocket.h.backport	2007-10-17 20:22:27.000000000 +0200
+++ filezilla-3.0.2.1/src/engine/sftpcontrolsocket.h	2007-11-07 16:00:18.000000000 +0100
@@ -100,7 +100,7 @@ protected:
 	int RenameSend(int prevResult = FZ_REPLY_OK);
 
 	bool Send(wxString cmd, const wxString& show = _T(""));
-	bool AddToStream(const wxString& cmd);
+	bool AddToStream(const wxString& cmd, bool force_utf8 = false);
 
 	virtual void OnRateAvailable(enum CRateLimiter::rate_direction direction);
 	void OnQuotaRequest(enum CRateLimiter::rate_direction direction);


Index: filezilla.spec
===================================================================
RCS file: /cvs/pkgs/rpms/filezilla/F-8/filezilla.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- filezilla.spec	19 Oct 2007 19:30:57 -0000	1.3
+++ filezilla.spec	7 Nov 2007 15:05:48 -0000	1.4
@@ -1,12 +1,13 @@
 Name:           filezilla
 Version:        3.0.2.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        FileZilla FTP, FTPS and SFTP client
 
 Group:          Applications/Internet
 License:        GPLv2+
 URL:            http://filezilla.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/%{name}/FileZilla_%{version}_src.tar.bz2
+Patch0:         FileZilla_3.0.3-backport.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 ## Needed if autogen.sh is invoked
@@ -40,6 +41,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .backport
 
 # Run autotools if needed
 # sh autogen.sh
@@ -102,6 +104,9 @@
 
 
 %changelog
+* Wed Nov  7 2007 kwizart < kwizart at gmail.com > - 3.0.2.1-2
+- backport fixes from 3.0.3
+
 * Fri Oct 19 2007 kwizart < kwizart at gmail.com > - 3.0.2.1-1
 - Update to 3.0.2.1
 




More information about the fedora-extras-commits mailing list