diff --git a/platformio/commands/home/rpc/handlers/app.py b/platformio/commands/home/rpc/handlers/app.py index b567f06b..d69cdc2f 100644 --- a/platformio/commands/home/rpc/handlers/app.py +++ b/platformio/commands/home/rpc/handlers/app.py @@ -64,9 +64,13 @@ class AppRPC: storage["projectsDir"] = storage["coreSettings"]["projects_dir"]["value"] # skip non-existing recent projects - storage["recentProjects"] = [ - p for p in storage.get("recentProjects", []) if is_platformio_project(p) - ] + storage["recentProjects"] = list( + set( + os.path.normpath(p) + for p in storage.get("recentProjects", []) + if is_platformio_project(p) + ) + ) state["storage"] = storage state.modified = False # skip saving extra fields diff --git a/platformio/commands/home/rpc/handlers/ide.py b/platformio/commands/home/rpc/handlers/ide.py index ad3cf063..703f75a6 100644 --- a/platformio/commands/home/rpc/handlers/ide.py +++ b/platformio/commands/home/rpc/handlers/ide.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os import time from ajsonrpc.core import JSONRPC20DispatchException @@ -51,6 +52,8 @@ class IDERPC: def on_command_result(self, cmd_id, value): if cmd_id not in self._cmd_queue: return + if self._cmd_queue[cmd_id]["method"] == "get_pio_project_dirs": + value = [os.path.normpath(p) for p in value] self._cmd_queue[cmd_id]["future"].set_result(value) del self._cmd_queue[cmd_id]