 
     /// Returns true if the state file exists on the filesystem.
     public func stateFileExists() -> Bool {
-        return fileSystem.exists(statePath)
+        return findStatePath() != nil
+    }
+
+    private func findStatePath() -> AbsolutePath? {
+        // Return the first path that exists.
+        let allPaths = [statePath] + otherStatePaths
+        let path = allPaths.first(where: { fileSystem.exists($0) })
+        return path
     }
 }

    /// The path at which we persist the state.
    private let statePath: AbsolutePath

    /// Writes the state files with pretty print JSON.
    private let prettyPrint: Bool



        default:
            throw Error.invalidSchemaVersion(version)
        }

        // If we loaded an old file path, migrate to the new one.
        if path != statePath {
            try fileSystem.move(from: path, to: statePath)
        }

        return true
