Skip to content

Commit 37ed7c4

Browse files
Merge branch 'stable31' into backport/58562/stable31
Signed-off-by: Cristian Scheid <74515775+cristianscheid@users.noreply.github.com> Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
2 parents c60477a + 1bdc3c2 commit 37ed7c4

2 files changed

Lines changed: 215 additions & 48 deletions

File tree

apps/dav/openapi.json

Lines changed: 213 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,20 @@
2929
"dav": {
3030
"type": "object",
3131
"required": [
32-
"chunking"
32+
"chunking",
33+
"search_supports_creation_time",
34+
"search_supports_upload_time"
3335
],
3436
"properties": {
3537
"chunking": {
3638
"type": "string"
3739
},
40+
"search_supports_creation_time": {
41+
"type": "boolean"
42+
},
43+
"search_supports_upload_time": {
44+
"type": "boolean"
45+
},
3846
"bulkupload": {
3947
"type": "string"
4048
},
@@ -216,8 +224,7 @@
216224
"schema": {
217225
"type": "object",
218226
"required": [
219-
"fileId",
220-
"expirationTime"
227+
"fileId"
221228
],
222229
"properties": {
223230
"fileId": {
@@ -369,6 +376,34 @@
369376
}
370377
}
371378
}
379+
},
380+
"401": {
381+
"description": "Current user is not logged in",
382+
"content": {
383+
"application/json": {
384+
"schema": {
385+
"type": "object",
386+
"required": [
387+
"ocs"
388+
],
389+
"properties": {
390+
"ocs": {
391+
"type": "object",
392+
"required": [
393+
"meta",
394+
"data"
395+
],
396+
"properties": {
397+
"meta": {
398+
"$ref": "#/components/schemas/OCSMeta"
399+
},
400+
"data": {}
401+
}
402+
}
403+
}
404+
}
405+
}
406+
}
372407
}
373408
}
374409
}
@@ -395,7 +430,8 @@
395430
"description": "location/URL to filter by",
396431
"schema": {
397432
"type": "string",
398-
"nullable": true
433+
"nullable": true,
434+
"default": null
399435
}
400436
},
401437
{
@@ -456,27 +492,52 @@
456492
"content": {
457493
"application/json": {
458494
"schema": {
459-
"type": "object",
460-
"required": [
461-
"ocs"
462-
],
463-
"properties": {
464-
"ocs": {
495+
"anyOf": [
496+
{
465497
"type": "object",
466498
"required": [
467-
"meta",
468-
"data"
499+
"ocs"
469500
],
470501
"properties": {
471-
"meta": {
472-
"$ref": "#/components/schemas/OCSMeta"
473-
},
474-
"data": {
475-
"nullable": true
502+
"ocs": {
503+
"type": "object",
504+
"required": [
505+
"meta",
506+
"data"
507+
],
508+
"properties": {
509+
"meta": {
510+
"$ref": "#/components/schemas/OCSMeta"
511+
},
512+
"data": {
513+
"nullable": true
514+
}
515+
}
516+
}
517+
}
518+
},
519+
{
520+
"type": "object",
521+
"required": [
522+
"ocs"
523+
],
524+
"properties": {
525+
"ocs": {
526+
"type": "object",
527+
"required": [
528+
"meta",
529+
"data"
530+
],
531+
"properties": {
532+
"meta": {
533+
"$ref": "#/components/schemas/OCSMeta"
534+
},
535+
"data": {}
536+
}
476537
}
477538
}
478539
}
479-
}
540+
]
480541
}
481542
}
482543
}
@@ -580,6 +641,34 @@
580641
}
581642
}
582643
}
644+
},
645+
"401": {
646+
"description": "Current user is not logged in",
647+
"content": {
648+
"application/json": {
649+
"schema": {
650+
"type": "object",
651+
"required": [
652+
"ocs"
653+
],
654+
"properties": {
655+
"ocs": {
656+
"type": "object",
657+
"required": [
658+
"meta",
659+
"data"
660+
],
661+
"properties": {
662+
"meta": {
663+
"$ref": "#/components/schemas/OCSMeta"
664+
},
665+
"data": {}
666+
}
667+
}
668+
}
669+
}
670+
}
671+
}
583672
}
584673
}
585674
}
@@ -680,6 +769,34 @@
680769
}
681770
}
682771
}
772+
},
773+
"401": {
774+
"description": "Current user is not logged in",
775+
"content": {
776+
"application/json": {
777+
"schema": {
778+
"type": "object",
779+
"required": [
780+
"ocs"
781+
],
782+
"properties": {
783+
"ocs": {
784+
"type": "object",
785+
"required": [
786+
"meta",
787+
"data"
788+
],
789+
"properties": {
790+
"meta": {
791+
"$ref": "#/components/schemas/OCSMeta"
792+
},
793+
"data": {}
794+
}
795+
}
796+
}
797+
}
798+
}
799+
}
683800
}
684801
}
685802
},
@@ -834,27 +951,52 @@
834951
"content": {
835952
"application/json": {
836953
"schema": {
837-
"type": "object",
838-
"required": [
839-
"ocs"
840-
],
841-
"properties": {
842-
"ocs": {
954+
"anyOf": [
955+
{
843956
"type": "object",
844957
"required": [
845-
"meta",
846-
"data"
958+
"ocs"
847959
],
848960
"properties": {
849-
"meta": {
850-
"$ref": "#/components/schemas/OCSMeta"
851-
},
852-
"data": {
853-
"nullable": true
961+
"ocs": {
962+
"type": "object",
963+
"required": [
964+
"meta",
965+
"data"
966+
],
967+
"properties": {
968+
"meta": {
969+
"$ref": "#/components/schemas/OCSMeta"
970+
},
971+
"data": {
972+
"nullable": true
973+
}
974+
}
975+
}
976+
}
977+
},
978+
{
979+
"type": "object",
980+
"required": [
981+
"ocs"
982+
],
983+
"properties": {
984+
"ocs": {
985+
"type": "object",
986+
"required": [
987+
"meta",
988+
"data"
989+
],
990+
"properties": {
991+
"meta": {
992+
"$ref": "#/components/schemas/OCSMeta"
993+
},
994+
"data": {}
995+
}
854996
}
855997
}
856998
}
857-
}
999+
]
8581000
}
8591001
}
8601002
}
@@ -961,27 +1103,52 @@
9611103
"content": {
9621104
"application/json": {
9631105
"schema": {
964-
"type": "object",
965-
"required": [
966-
"ocs"
967-
],
968-
"properties": {
969-
"ocs": {
1106+
"anyOf": [
1107+
{
9701108
"type": "object",
9711109
"required": [
972-
"meta",
973-
"data"
1110+
"ocs"
9741111
],
9751112
"properties": {
976-
"meta": {
977-
"$ref": "#/components/schemas/OCSMeta"
978-
},
979-
"data": {
980-
"nullable": true
1113+
"ocs": {
1114+
"type": "object",
1115+
"required": [
1116+
"meta",
1117+
"data"
1118+
],
1119+
"properties": {
1120+
"meta": {
1121+
"$ref": "#/components/schemas/OCSMeta"
1122+
},
1123+
"data": {
1124+
"nullable": true
1125+
}
1126+
}
1127+
}
1128+
}
1129+
},
1130+
{
1131+
"type": "object",
1132+
"required": [
1133+
"ocs"
1134+
],
1135+
"properties": {
1136+
"ocs": {
1137+
"type": "object",
1138+
"required": [
1139+
"meta",
1140+
"data"
1141+
],
1142+
"properties": {
1143+
"meta": {
1144+
"$ref": "#/components/schemas/OCSMeta"
1145+
},
1146+
"data": {}
1147+
}
9811148
}
9821149
}
9831150
}
984-
}
1151+
]
9851152
}
9861153
}
9871154
}

lib/private/Files/View.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ public function copy($source, $target, $preserveMtime = false) {
937937

938938
try {
939939
$exists = $this->file_exists($target);
940-
if ($this->shouldEmitHooks($target)) {
940+
if ($this->shouldEmitHooks($source) && $this->shouldEmitHooks($target)) {
941941
\OC_Hook::emit(
942942
Filesystem::CLASSNAME,
943943
Filesystem::signal_copy,
@@ -977,7 +977,7 @@ public function copy($source, $target, $preserveMtime = false) {
977977
$this->changeLock($target, ILockingProvider::LOCK_SHARED);
978978
$lockTypePath2 = ILockingProvider::LOCK_SHARED;
979979

980-
if ($this->shouldEmitHooks($target) && $result !== false) {
980+
if ($this->shouldEmitHooks($source) && $this->shouldEmitHooks($target) && $result !== false) {
981981
\OC_Hook::emit(
982982
Filesystem::CLASSNAME,
983983
Filesystem::signal_post_copy,

0 commit comments

Comments
 (0)