We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ae6393 commit ac366e1Copy full SHA for ac366e1
lib/public/EventDispatcher/JsonSerializer.php
@@ -9,6 +9,8 @@
9
10
namespace OCP\EventDispatcher;
11
12
+use OC\Files\Node\NonExistingFile;
13
+use OC\Files\Node\NonExistingFolder;
14
use OCP\Files\FileInfo;
15
use OCP\IUser;
16
@@ -24,10 +26,16 @@ final class JsonSerializer {
24
26
* @since 30.0.0
25
27
*/
28
public static function serializeFileInfo(FileInfo $node): array {
- return [
- 'id' => $node->getId(),
29
- 'path' => $node->getPath(),
30
- ];
+ if ($node instanceof NonExistingFile || $node instanceof NonExistingFolder) {
+ return [
31
+ 'path' => $node->getPath(),
32
+ ];
33
+ } else {
34
35
+ 'id' => $node->getId(),
36
37
38
+ }
39
}
40
41
/**
0 commit comments