fix: Use consistent path separators for workspace folder location in settings menu (#2349)

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
This commit is contained in:
GitStart 2023-04-25 15:02:04 +03:00 committed by GitHub
parent fccd6135f7
commit 857cd9ff55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,8 @@ class SettingsLocation {
if (Platform.isMacOS) {
// remove the prefix `/Volumes/*`
return _path?.replaceFirst(RegExp(r'^/Volumes/[^/]+'), '');
} else if (Platform.isWindows) {
return _path?.replaceAll("/", "\\");
}
return _path;
}