[Pkg-owncloud-commits] [owncloud-client] 453/470: Windows: Fix Share menu #4781
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:25:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 8820bc1c17edbc26cf2b8f7fa3ea8d18c0094e84
Author: Markus Goetz <markus at woboq.com>
Date: Mon May 9 14:37:46 2016 +0200
Windows: Fix Share menu #4781
---
.../windows/OCContextMenu/OCClientInterface.cpp | 15 ++++++++++++++-
shell_integration/windows/OCUtil/RemotePathChecker.cpp | 2 +-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/shell_integration/windows/OCContextMenu/OCClientInterface.cpp b/shell_integration/windows/OCContextMenu/OCClientInterface.cpp
index 7d9783b..7f21292 100644
--- a/shell_integration/windows/OCContextMenu/OCClientInterface.cpp
+++ b/shell_integration/windows/OCContextMenu/OCClientInterface.cpp
@@ -34,10 +34,23 @@ using namespace std;
#define PIPE_TIMEOUT 5*1000 //ms
#define SOCK_BUFFER 4096
+// TODO: Unify this with RemotePathChecker.cpp
+#define BUFSIZE 512
+std::wstring getUserName() {
+ DWORD len = BUFSIZE;
+ TCHAR buf[BUFSIZE];
+ if (GetUserName(buf, &len)) {
+ return std::wstring(&buf[0], len);
+ } else {
+ return std::wstring();
+ }
+}
+
OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
{
auto pipename = std::wstring(L"\\\\.\\pipe\\");
- pipename += L"ownCloud";
+ pipename += L"ownCloud\\";
+ pipename += getUserName();
CommunicationSocket socket;
if (!WaitNamedPipe(pipename.data(), PIPE_TIMEOUT)) {
diff --git a/shell_integration/windows/OCUtil/RemotePathChecker.cpp b/shell_integration/windows/OCUtil/RemotePathChecker.cpp
index d03a383..fcca989 100644
--- a/shell_integration/windows/OCUtil/RemotePathChecker.cpp
+++ b/shell_integration/windows/OCUtil/RemotePathChecker.cpp
@@ -31,8 +31,8 @@
using namespace std;
+// FIXME: Unify this with OCClientInterface.cpp
#define BUFSIZE 512
-
std::wstring getUserName() {
DWORD len = BUFSIZE;
TCHAR buf[BUFSIZE];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list