/** \file ExtraSocket.h \brief Define the socket of ultracopier \author alpha_one_x86 \licence GPL3, see the file COPYING */ #include "ExtraSocket.h" #include #include std::string ExtraSocket::pathSocket(const std::string &name) { #ifdef Q_OS_UNIX return name+"-"+std::to_string(getuid()); #else QString userName; /* bad way for catchcopy compatibility char uname[1024]; DWORD len=1023; if(GetUserNameA(uname, &len)!=FALSE) userName=toHex(uname);*/ QChar charTemp; DWORD size=255; WCHAR * userNameW=new WCHAR[size]; if(GetUserNameW(userNameW,&size)) { QByteArray tempArray; userName=QString::fromWCharArray(userNameW,size-1); int index=0; while(index