 
     /// 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
     }
 }

    }

    private func _restoreState(_ object: SimplePersistanceProtocol) throws -> Bool {
        // If the state doesn't exist, don't try to load and fail.
        if !fileSystem.exists(statePath) {
            return false
        }
        // Load the state.
        let json = try JSON(bytes: try fileSystem.readFileContents(statePath))
        // Get the schema version.
        let version: Int = try json.get("version")


        self.schemaVersion = schemaVersion
        self.supportedSchemaVersions = supportedSchemaVersions
        self.statePath = statePath
        self.otherStatePaths = otherStatePaths
        self.prettyPrint = prettyPrint
    }

