mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
FileSystem: Use long file name handling method from csync.
This helps to only maintain one version of the function.
This commit is contained in:
parent
02a5a8ea3b
commit
b8077d2f5b
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user