From 0bf392801499bc2b7f65920ba56b29b0b1ae8aa7 Mon Sep 17 00:00:00 2001 From: Scott Martin Date: Mon, 12 Dec 2022 09:38:27 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20'operation'=20field=20to=20FI?= =?UTF-8?q?LE=5FADDED=20events=20(#4687)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AUTHORS.md | 1 + src/octoprint/filemanager/__init__.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/AUTHORS.md b/AUTHORS.md index 2c0d78911..ef24edf84 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -173,6 +173,7 @@ date of first contribution): * [Arkadiusz Miƛkiewicz](https://github.com/arekm) * ["tempodat"](https://github.com/tempodat) * [Frederik Kemner](https://github.com/040medien) + * [Scott Martin](https://github.com/smartin015) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/src/octoprint/filemanager/__init__.py b/src/octoprint/filemanager/__init__.py index 4315221db..789ca3c83 100644 --- a/src/octoprint/filemanager/__init__.py +++ b/src/octoprint/filemanager/__init__.py @@ -750,6 +750,7 @@ class FileManager: "path": path_in_storage, "name": name, "type": get_file_type(name), + "operation": "add", }, ) eventManager().fire(Events.UPDATED_FILES, {"type": "printables"}) @@ -787,6 +788,7 @@ class FileManager: "path": path_in_storage, "name": name, "type": get_file_type(name), + "operation": "copy", }, ) eventManager().fire(Events.UPDATED_FILES, {"type": "printables"}) @@ -821,6 +823,7 @@ class FileManager: "path": dst_path_in_storage, "name": dst_name, "type": get_file_type(dst_name), + "operation": "move", }, ) eventManager().fire(