FileSystem: Use long file name handling method from csync.

This helps to only maintain one version of the function.
This commit is contained in:
Klaas Freitag 2015-07-03 16:26:33 +02:00
parent 02a5a8ea3b
commit b8077d2f5b

View File

@ -42,6 +42,7 @@ extern "C" void csync_win32_set_file_hidden( const char *file, bool h );
extern "C" {
#include "csync.h"
#include "vio/csync_vio_local.h"
#include "std/c_path.h"
}
namespace OCC {
@ -50,9 +51,9 @@ QString FileSystem::longWinPath( const QString& inpath )
{
QString path(inpath);
path.replace('/', '\\');
path.prepend(QLatin1String("\\\\?\\"));
#ifdef Q_OS_WIN
path = QString::fromWCharArray( static_cast<wchar_t*>( c_utf8_path_to_locale(inpath.toUtf8() ) ) );
#endif
return path;
}