         for dependency in dependencies where dependency.isInEditableState {
             // If some edited dependency has been removed, mark it as unedited.
             let dependencyPath = editablesPath.appending(dependency.subpath)
-            if !localFileSystem.exists(dependencyPath) {
+            if !fileSystem.exists(dependencyPath) {
                 try unedit(dependency: dependency, forceRemove: true)
                 // FIXME: Use diagnosics engine when we have that.
                 print("warning: \(dependencyPath.asString) was being edited but has been removed, falling back to original checkout.")

    ///   - dataPath: The path for the workspace data files, if explicitly provided.
    ///   - editablesPath: The path where editable packages should be placed, if explicitly provided.
    ///   - manifestLoader: The manifest loader.
    /// - Throws: If the state was present, but could not be loaded.
    public init(
        rootPackage path: AbsolutePath,
        dataPath: AbsolutePath? = nil,
        editablesPath: AbsolutePath? = nil,
        manifestLoader: ManifestLoaderProtocol,
        delegate: WorkspaceDelegate
    ) throws {
        self.delegate = delegate
        self.rootPackagePath = path

            }
        }
        // Remove the editable checkout from disk.
        if fileSystem.exists(path) {
            fileSystem.removeFileTree(path)
        }
        // If this was the last editable dependency, remove the editables directory too.
        if fileSystem.exists(editablesPath), try fileSystem.getDirectoryContents(editablesPath).isEmpty {
            fileSystem.removeFileTree(editablesPath)
        }
        // Restore the dependency state.
        dependencyMap[dependency.repository] = basedOn
