Protect Chrome debugging from other local OS accounts
This commit is contained in:
@@ -142,8 +142,8 @@ func captureTool(_ args: [String: Any]) async throws -> [Content] {
|
||||
return [.text("\(shot.note); saved to \(try save(shot.png))"), .png(shot.png)]
|
||||
}
|
||||
|
||||
func save(_ png: Data) throws -> String {
|
||||
guard let dir = mediaDir else {
|
||||
func save(_ png: Data, in directory: String? = mediaDir) throws -> String {
|
||||
guard let dir = directory else {
|
||||
throw ToolError("save needs byre's media folder, and this byre-hands has none")
|
||||
}
|
||||
let url = URL(filePath: dir).appending(path: "capture-\(UUID().uuidString.prefix(8).lowercased()).png")
|
||||
|
||||
Reference in New Issue
Block a user