Resolve handling of maximum path length calculation (Issue #134) (#135)

* Update the handling of maximum path length calculation
This commit is contained in:
borouhin 2018-08-27 03:43:49 +03:00 committed by abraunegg
parent a3f69d4a2e
commit a08df3d7fd

View file

@ -950,6 +950,8 @@ final class SyncEngine
// 400 Character Limit for OneDrive Business / Office 365
// 430 Character Limit for OneDrive Personal
auto maxPathLength = 0;
import std.range : walkLength;
import std.uni : byGrapheme;
if (accountType == "business"){
// Business Account
maxPathLength = 400;
@ -958,7 +960,7 @@ final class SyncEngine
maxPathLength = 430;
}
if(encodeComponent(path).length < maxPathLength){
if(path.byGrapheme.walkLength < maxPathLength){
// path is less than maxPathLength
if (isSymlink(path)) {