Pārlūkot izejas kodu

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

Co-authored-by: gitstart <[email protected]>
GitStart 2 gadi atpakaļ
vecāks
revīzija
857cd9ff55

+ 2 - 0
frontend/appflowy_flutter/lib/workspace/application/settings/settings_location_cubit.dart

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