diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 3 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 3 | ||||
-rw-r--r-- | lib/l10n/de_DE.js | 4 | ||||
-rw-r--r-- | lib/l10n/de_DE.json | 4 | ||||
-rw-r--r-- | lib/l10n/en_GB.js | 7 | ||||
-rw-r--r-- | lib/l10n/en_GB.json | 7 | ||||
-rw-r--r-- | lib/l10n/es.js | 5 | ||||
-rw-r--r-- | lib/l10n/es.json | 5 | ||||
-rw-r--r-- | lib/l10n/et_EE.js | 5 | ||||
-rw-r--r-- | lib/l10n/et_EE.json | 5 | ||||
-rw-r--r-- | lib/l10n/pl.js | 1 | ||||
-rw-r--r-- | lib/l10n/pl.json | 1 | ||||
-rw-r--r-- | lib/l10n/zh_HK.js | 7 | ||||
-rw-r--r-- | lib/l10n/zh_HK.json | 7 | ||||
-rw-r--r-- | lib/private/Files/Node/Folder.php | 17 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 23 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Quota.php | 8 | ||||
-rw-r--r-- | lib/private/Files/View.php | 11 | ||||
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 42 | ||||
-rw-r--r-- | lib/private/Share20/Manager.php | 13 | ||||
-rw-r--r-- | lib/public/Calendar/ICalendarIsEnabled.php | 24 | ||||
-rw-r--r-- | lib/public/Encryption/Exceptions/InvalidHeaderException.php | 17 | ||||
-rw-r--r-- | lib/public/Share/IShareProviderSupportsAllSharesInFolder.php | 24 |
23 files changed, 218 insertions, 25 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 177abfefe8e..f15d4e2d55f 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -204,6 +204,7 @@ return array( 'OCP\\Calendar\\ICalendar' => $baseDir . '/lib/public/Calendar/ICalendar.php', 'OCP\\Calendar\\ICalendarEventBuilder' => $baseDir . '/lib/public/Calendar/ICalendarEventBuilder.php', 'OCP\\Calendar\\ICalendarExport' => $baseDir . '/lib/public/Calendar/ICalendarExport.php', + 'OCP\\Calendar\\ICalendarIsEnabled' => $baseDir . '/lib/public/Calendar/ICalendarIsEnabled.php', 'OCP\\Calendar\\ICalendarIsShared' => $baseDir . '/lib/public/Calendar/ICalendarIsShared.php', 'OCP\\Calendar\\ICalendarIsWritable' => $baseDir . '/lib/public/Calendar/ICalendarIsWritable.php', 'OCP\\Calendar\\ICalendarProvider' => $baseDir . '/lib/public/Calendar/ICalendarProvider.php', @@ -320,6 +321,7 @@ return array( 'OCP\\DirectEditing\\IToken' => $baseDir . '/lib/public/DirectEditing/IToken.php', 'OCP\\DirectEditing\\RegisterDirectEditorEvent' => $baseDir . '/lib/public/DirectEditing/RegisterDirectEditorEvent.php', 'OCP\\Encryption\\Exceptions\\GenericEncryptionException' => $baseDir . '/lib/public/Encryption/Exceptions/GenericEncryptionException.php', + 'OCP\\Encryption\\Exceptions\\InvalidHeaderException' => $baseDir . '/lib/public/Encryption/Exceptions/InvalidHeaderException.php', 'OCP\\Encryption\\IEncryptionModule' => $baseDir . '/lib/public/Encryption/IEncryptionModule.php', 'OCP\\Encryption\\IFile' => $baseDir . '/lib/public/Encryption/IFile.php', 'OCP\\Encryption\\IManager' => $baseDir . '/lib/public/Encryption/IManager.php', @@ -780,6 +782,7 @@ return array( 'OCP\\Share\\IShareHelper' => $baseDir . '/lib/public/Share/IShareHelper.php', 'OCP\\Share\\IShareProvider' => $baseDir . '/lib/public/Share/IShareProvider.php', 'OCP\\Share\\IShareProviderSupportsAccept' => $baseDir . '/lib/public/Share/IShareProviderSupportsAccept.php', + 'OCP\\Share\\IShareProviderSupportsAllSharesInFolder' => $baseDir . '/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php', 'OCP\\Share\\IShareProviderWithNotification' => $baseDir . '/lib/public/Share/IShareProviderWithNotification.php', 'OCP\\Share_Backend' => $baseDir . '/lib/public/Share_Backend.php', 'OCP\\Share_Backend_Collection' => $baseDir . '/lib/public/Share_Backend_Collection.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index ddccd0692ca..dfb238acbf3 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -245,6 +245,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\Calendar\\ICalendar' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendar.php', 'OCP\\Calendar\\ICalendarEventBuilder' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarEventBuilder.php', 'OCP\\Calendar\\ICalendarExport' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarExport.php', + 'OCP\\Calendar\\ICalendarIsEnabled' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarIsEnabled.php', 'OCP\\Calendar\\ICalendarIsShared' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarIsShared.php', 'OCP\\Calendar\\ICalendarIsWritable' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarIsWritable.php', 'OCP\\Calendar\\ICalendarProvider' => __DIR__ . '/../../..' . '/lib/public/Calendar/ICalendarProvider.php', @@ -361,6 +362,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\DirectEditing\\IToken' => __DIR__ . '/../../..' . '/lib/public/DirectEditing/IToken.php', 'OCP\\DirectEditing\\RegisterDirectEditorEvent' => __DIR__ . '/../../..' . '/lib/public/DirectEditing/RegisterDirectEditorEvent.php', 'OCP\\Encryption\\Exceptions\\GenericEncryptionException' => __DIR__ . '/../../..' . '/lib/public/Encryption/Exceptions/GenericEncryptionException.php', + 'OCP\\Encryption\\Exceptions\\InvalidHeaderException' => __DIR__ . '/../../..' . '/lib/public/Encryption/Exceptions/InvalidHeaderException.php', 'OCP\\Encryption\\IEncryptionModule' => __DIR__ . '/../../..' . '/lib/public/Encryption/IEncryptionModule.php', 'OCP\\Encryption\\IFile' => __DIR__ . '/../../..' . '/lib/public/Encryption/IFile.php', 'OCP\\Encryption\\IManager' => __DIR__ . '/../../..' . '/lib/public/Encryption/IManager.php', @@ -821,6 +823,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OCP\\Share\\IShareHelper' => __DIR__ . '/../../..' . '/lib/public/Share/IShareHelper.php', 'OCP\\Share\\IShareProvider' => __DIR__ . '/../../..' . '/lib/public/Share/IShareProvider.php', 'OCP\\Share\\IShareProviderSupportsAccept' => __DIR__ . '/../../..' . '/lib/public/Share/IShareProviderSupportsAccept.php', + 'OCP\\Share\\IShareProviderSupportsAllSharesInFolder' => __DIR__ . '/../../..' . '/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php', 'OCP\\Share\\IShareProviderWithNotification' => __DIR__ . '/../../..' . '/lib/public/Share/IShareProviderWithNotification.php', 'OCP\\Share_Backend' => __DIR__ . '/../../..' . '/lib/public/Share_Backend.php', 'OCP\\Share_Backend_Collection' => __DIR__ . '/../../..' . '/lib/public/Share_Backend_Collection.php', diff --git a/lib/l10n/de_DE.js b/lib/l10n/de_DE.js index 2d101052cf5..aa926c96d4f 100644 --- a/lib/l10n/de_DE.js +++ b/lib/l10n/de_DE.js @@ -133,7 +133,7 @@ OC.L10N.register( "View %s on the fediverse" : "Zeige %s auf dem Fediverse", "Phone" : "Telefon", "Call %s" : "%s anrufen", - "Twitter" : "Twitter", + "Twitter" : "X", "View %s on Twitter" : "%s auf Twitter anzeigen", "Website" : "Webseite", "Visit %s" : "%s besuchen", @@ -273,7 +273,7 @@ OC.L10N.register( "A valid Login must be provided" : "Ein gültiger Anmeldename muss angegeben werden.", "Login contains whitespace at the beginning or at the end" : "Anmeldename enthält Leerzeichen am Anfang oder am Ende", "Login must not consist of dots only" : "Der Anmeldename darf nicht nur aus Punkten bestehen", - "Login is too long" : "Die Anmeldung dauert zu lange", + "Login is too long" : "Der Kontenname ist zu lang", "Login is invalid because files already exist for this user" : "Der Anmeldename ist ungültig, da bereits Dateien von diesem Benutzer existieren", "Account disabled" : "Konto deaktiviert", "Login canceled by app" : "Anmeldung durch die App abgebrochen", diff --git a/lib/l10n/de_DE.json b/lib/l10n/de_DE.json index ea316cb1060..f23493df570 100644 --- a/lib/l10n/de_DE.json +++ b/lib/l10n/de_DE.json @@ -131,7 +131,7 @@ "View %s on the fediverse" : "Zeige %s auf dem Fediverse", "Phone" : "Telefon", "Call %s" : "%s anrufen", - "Twitter" : "Twitter", + "Twitter" : "X", "View %s on Twitter" : "%s auf Twitter anzeigen", "Website" : "Webseite", "Visit %s" : "%s besuchen", @@ -271,7 +271,7 @@ "A valid Login must be provided" : "Ein gültiger Anmeldename muss angegeben werden.", "Login contains whitespace at the beginning or at the end" : "Anmeldename enthält Leerzeichen am Anfang oder am Ende", "Login must not consist of dots only" : "Der Anmeldename darf nicht nur aus Punkten bestehen", - "Login is too long" : "Die Anmeldung dauert zu lange", + "Login is too long" : "Der Kontenname ist zu lang", "Login is invalid because files already exist for this user" : "Der Anmeldename ist ungültig, da bereits Dateien von diesem Benutzer existieren", "Account disabled" : "Konto deaktiviert", "Login canceled by app" : "Anmeldung durch die App abgebrochen", diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js index 93782960c94..2494ab4aca4 100644 --- a/lib/l10n/en_GB.js +++ b/lib/l10n/en_GB.js @@ -201,6 +201,7 @@ OC.L10N.register( "Path is already shared with this group" : "Path is already shared with this group", "Link sharing is not allowed" : "Link sharing is not allowed", "Public upload is not allowed" : "Public upload is not allowed", + "You cannot share a folder that contains other shares" : "You cannot share a folder that contains other shares", "Sharing is disabled" : "Sharing is disabled", "Sharing is disabled for you" : "Sharing is disabled for you", "Cannot share with the share owner" : "Cannot share with the share owner", @@ -272,6 +273,7 @@ OC.L10N.register( "A valid Login must be provided" : "A valid Login must be provided", "Login contains whitespace at the beginning or at the end" : "Login contains whitespace at the beginning or at the end", "Login must not consist of dots only" : "Login must not consist of dots only", + "Login is too long" : "Login is too long", "Login is invalid because files already exist for this user" : "Login is invalid because files already exist for this user", "Account disabled" : "Account disabled", "Login canceled by app" : "Login cancelled by app", @@ -362,6 +364,11 @@ OC.L10N.register( "How many images to generate" : "How many images to generate", "Output images" : "Output images", "The generated images" : "The generated images", + "Generate speech" : "Generate speech", + "Generate speech from a transcript" : "Generate speech from a transcript", + "Write transcript that you want the assistant to generate speech from" : "Write transcript that you want the assistant to generate speech from", + "Output speech" : "Output speech", + "The generated speech" : "The generated speech", "Free text to text prompt" : "Free text to text prompt", "Runs an arbitrary prompt through a language model that returns a reply" : "Runs an arbitrary prompt through a language model that returns a reply", "Describe a task that you want the assistant to do or ask a question" : "Describe a task that you want the assistant to do or ask a question", diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json index 40402118ddf..08e84f39af1 100644 --- a/lib/l10n/en_GB.json +++ b/lib/l10n/en_GB.json @@ -199,6 +199,7 @@ "Path is already shared with this group" : "Path is already shared with this group", "Link sharing is not allowed" : "Link sharing is not allowed", "Public upload is not allowed" : "Public upload is not allowed", + "You cannot share a folder that contains other shares" : "You cannot share a folder that contains other shares", "Sharing is disabled" : "Sharing is disabled", "Sharing is disabled for you" : "Sharing is disabled for you", "Cannot share with the share owner" : "Cannot share with the share owner", @@ -270,6 +271,7 @@ "A valid Login must be provided" : "A valid Login must be provided", "Login contains whitespace at the beginning or at the end" : "Login contains whitespace at the beginning or at the end", "Login must not consist of dots only" : "Login must not consist of dots only", + "Login is too long" : "Login is too long", "Login is invalid because files already exist for this user" : "Login is invalid because files already exist for this user", "Account disabled" : "Account disabled", "Login canceled by app" : "Login cancelled by app", @@ -360,6 +362,11 @@ "How many images to generate" : "How many images to generate", "Output images" : "Output images", "The generated images" : "The generated images", + "Generate speech" : "Generate speech", + "Generate speech from a transcript" : "Generate speech from a transcript", + "Write transcript that you want the assistant to generate speech from" : "Write transcript that you want the assistant to generate speech from", + "Output speech" : "Output speech", + "The generated speech" : "The generated speech", "Free text to text prompt" : "Free text to text prompt", "Runs an arbitrary prompt through a language model that returns a reply" : "Runs an arbitrary prompt through a language model that returns a reply", "Describe a task that you want the assistant to do or ask a question" : "Describe a task that you want the assistant to do or ask a question", diff --git a/lib/l10n/es.js b/lib/l10n/es.js index 94e52dbc724..a3cf61509ec 100644 --- a/lib/l10n/es.js +++ b/lib/l10n/es.js @@ -364,6 +364,11 @@ OC.L10N.register( "How many images to generate" : "Cuántas imágenes se generarán", "Output images" : "Imágenes de salida", "The generated images" : "Las imágenes generadas", + "Generate speech" : "Generar dictado", + "Generate speech from a transcript" : "Generar dictado desde una transcripción", + "Write transcript that you want the assistant to generate speech from" : "Escriba la transcripción desde la que desea que el asistente genere un dictado", + "Output speech" : "Dictado de salida", + "The generated speech" : "El dictado generado", "Free text to text prompt" : "Texto libre a prompt de texto", "Runs an arbitrary prompt through a language model that returns a reply" : "Ejecuta un prompt arbitrario a través de un modelo de lenguaje que retorna una respuesta", "Describe a task that you want the assistant to do or ask a question" : "Describa una tarea que quiere que el asistente realice, o, haga una pregunta", diff --git a/lib/l10n/es.json b/lib/l10n/es.json index 61f519db2a7..34d4db2eec4 100644 --- a/lib/l10n/es.json +++ b/lib/l10n/es.json @@ -362,6 +362,11 @@ "How many images to generate" : "Cuántas imágenes se generarán", "Output images" : "Imágenes de salida", "The generated images" : "Las imágenes generadas", + "Generate speech" : "Generar dictado", + "Generate speech from a transcript" : "Generar dictado desde una transcripción", + "Write transcript that you want the assistant to generate speech from" : "Escriba la transcripción desde la que desea que el asistente genere un dictado", + "Output speech" : "Dictado de salida", + "The generated speech" : "El dictado generado", "Free text to text prompt" : "Texto libre a prompt de texto", "Runs an arbitrary prompt through a language model that returns a reply" : "Ejecuta un prompt arbitrario a través de un modelo de lenguaje que retorna una respuesta", "Describe a task that you want the assistant to do or ask a question" : "Describa una tarea que quiere que el asistente realice, o, haga una pregunta", diff --git a/lib/l10n/et_EE.js b/lib/l10n/et_EE.js index d0ff1a1e511..7932c79256b 100644 --- a/lib/l10n/et_EE.js +++ b/lib/l10n/et_EE.js @@ -293,6 +293,11 @@ OC.L10N.register( "The audio to transcribe" : "Üleskirjutatav helifail", "Transcription" : "Üleskirjutus", "The transcribed text" : "Üleskirjutatud tekst", + "Confirmation" : "Kinnitus", + "Context write" : "Kontekstuaalne kirjutamine", + "Writes text in a given style based on the provided source material." : "Kirjutab etteantud lähtematerjali lausel teksti üles.", + "Writing style" : "Kirjutamisstiil", + "Source material" : "Lähtematerjal", "Generate image" : "Piltide loomine", "Generate an image from a text prompt" : "Loo tekstisisendist pilt", "Prompt" : "Sisendvorm", diff --git a/lib/l10n/et_EE.json b/lib/l10n/et_EE.json index f42e00f28f1..99c9583bf87 100644 --- a/lib/l10n/et_EE.json +++ b/lib/l10n/et_EE.json @@ -291,6 +291,11 @@ "The audio to transcribe" : "Üleskirjutatav helifail", "Transcription" : "Üleskirjutus", "The transcribed text" : "Üleskirjutatud tekst", + "Confirmation" : "Kinnitus", + "Context write" : "Kontekstuaalne kirjutamine", + "Writes text in a given style based on the provided source material." : "Kirjutab etteantud lähtematerjali lausel teksti üles.", + "Writing style" : "Kirjutamisstiil", + "Source material" : "Lähtematerjal", "Generate image" : "Piltide loomine", "Generate an image from a text prompt" : "Loo tekstisisendist pilt", "Prompt" : "Sisendvorm", diff --git a/lib/l10n/pl.js b/lib/l10n/pl.js index 213b78d5c28..0d9fd0cb98a 100644 --- a/lib/l10n/pl.js +++ b/lib/l10n/pl.js @@ -307,6 +307,7 @@ OC.L10N.register( "Chat" : "Rozmowa", "Chat history" : "Historia rozmów", "Generates a possible headline for a text." : "Generuje możliwy nagłówek tekstu.", + "Original text" : "Tekst oryginalny", "Text" : "Tekst", "Summarize" : "Podsumuj", "Summary" : "Podsumowanie", diff --git a/lib/l10n/pl.json b/lib/l10n/pl.json index 6837f941bb7..c97634e8eff 100644 --- a/lib/l10n/pl.json +++ b/lib/l10n/pl.json @@ -305,6 +305,7 @@ "Chat" : "Rozmowa", "Chat history" : "Historia rozmów", "Generates a possible headline for a text." : "Generuje możliwy nagłówek tekstu.", + "Original text" : "Tekst oryginalny", "Text" : "Tekst", "Summarize" : "Podsumuj", "Summary" : "Podsumowanie", diff --git a/lib/l10n/zh_HK.js b/lib/l10n/zh_HK.js index 7a98e4b4905..a85c29e400c 100644 --- a/lib/l10n/zh_HK.js +++ b/lib/l10n/zh_HK.js @@ -201,6 +201,7 @@ OC.L10N.register( "Path is already shared with this group" : "已與此群組分享了路徑", "Link sharing is not allowed" : "不允許連結分享", "Public upload is not allowed" : "不允許公開上傳", + "You cannot share a folder that contains other shares" : "您無法分享包含其他分享的資料夾", "Sharing is disabled" : "已停用分享", "Sharing is disabled for you" : "您已停用分享", "Cannot share with the share owner" : "無法與分享擁有者分享", @@ -272,6 +273,7 @@ OC.L10N.register( "A valid Login must be provided" : "必須提供有效帳戶", "Login contains whitespace at the beginning or at the end" : "帳戶的開頭或結尾有空白", "Login must not consist of dots only" : "帳戶不能只包含小數點", + "Login is too long" : "帳號太長了", "Login is invalid because files already exist for this user" : "帳戶無效,因為此用戶的檔案已經存在", "Account disabled" : "帳戶已停用", "Login canceled by app" : "登入已被應用程式取消", @@ -362,6 +364,11 @@ OC.L10N.register( "How many images to generate" : "要產生多少圖像", "Output images" : "輸出圖像", "The generated images" : "產生的圖像", + "Generate speech" : "產生語音", + "Generate speech from a transcript" : "從文字稿産生語音", + "Write transcript that you want the assistant to generate speech from" : "寫下您想要小幫手產生語音的文字稿", + "Output speech" : "輸出語音", + "The generated speech" : "產生的語音", "Free text to text prompt" : "文字提示的自由文字", "Runs an arbitrary prompt through a language model that returns a reply" : "透過回傳回覆的語言模型執行任意提示", "Describe a task that you want the assistant to do or ask a question" : "描述您希望助理執行的任務或提出問題", diff --git a/lib/l10n/zh_HK.json b/lib/l10n/zh_HK.json index 94658c90974..b58db1e510c 100644 --- a/lib/l10n/zh_HK.json +++ b/lib/l10n/zh_HK.json @@ -199,6 +199,7 @@ "Path is already shared with this group" : "已與此群組分享了路徑", "Link sharing is not allowed" : "不允許連結分享", "Public upload is not allowed" : "不允許公開上傳", + "You cannot share a folder that contains other shares" : "您無法分享包含其他分享的資料夾", "Sharing is disabled" : "已停用分享", "Sharing is disabled for you" : "您已停用分享", "Cannot share with the share owner" : "無法與分享擁有者分享", @@ -270,6 +271,7 @@ "A valid Login must be provided" : "必須提供有效帳戶", "Login contains whitespace at the beginning or at the end" : "帳戶的開頭或結尾有空白", "Login must not consist of dots only" : "帳戶不能只包含小數點", + "Login is too long" : "帳號太長了", "Login is invalid because files already exist for this user" : "帳戶無效,因為此用戶的檔案已經存在", "Account disabled" : "帳戶已停用", "Login canceled by app" : "登入已被應用程式取消", @@ -360,6 +362,11 @@ "How many images to generate" : "要產生多少圖像", "Output images" : "輸出圖像", "The generated images" : "產生的圖像", + "Generate speech" : "產生語音", + "Generate speech from a transcript" : "從文字稿産生語音", + "Write transcript that you want the assistant to generate speech from" : "寫下您想要小幫手產生語音的文字稿", + "Output speech" : "輸出語音", + "The generated speech" : "產生的語音", "Free text to text prompt" : "文字提示的自由文字", "Runs an arbitrary prompt through a language model that returns a reply" : "透過回傳回覆的語言模型執行任意提示", "Describe a task that you want the assistant to do or ask a question" : "描述您希望助理執行的任務或提出問題", diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index a894c69649a..16365948031 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -126,8 +126,21 @@ class Folder extends Node implements \OCP\Files\Folder { $fullPath = $this->getFullPath($path); $nonExisting = new NonExistingFolder($this->root, $this->view, $fullPath); $this->sendHooks(['preWrite', 'preCreate'], [$nonExisting]); - if (!$this->view->mkdir($fullPath) && !$this->view->is_dir($fullPath)) { - throw new NotPermittedException('Could not create folder "' . $fullPath . '"'); + if (!$this->view->mkdir($fullPath)) { + // maybe another concurrent process created the folder already + if (!$this->view->is_dir($fullPath)) { + throw new NotPermittedException('Could not create folder "' . $fullPath . '"'); + } else { + // we need to ensure we don't return before the concurrent request has finished updating the cache + $tries = 5; + while (!$this->view->getFileInfo($fullPath)) { + if ($tries < 1) { + throw new NotPermittedException('Could not create folder "' . $fullPath . '", folder exists but unable to get cache entry'); + } + usleep(5 * 1000); + $tries--; + } + } } $parent = dirname($fullPath) === $this->getPath() ? $this : null; $node = new Folder($this->root, $this->view, $fullPath, null, $parent); diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index ba23f3c43ec..bdaba57687a 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -18,6 +18,7 @@ use OC\Files\Storage\Common; use OC\Files\Storage\LocalTempFileTrait; use OC\Memcache\ArrayCache; use OCP\Cache\CappedMemoryCache; +use OCP\Encryption\Exceptions\InvalidHeaderException; use OCP\Encryption\IFile; use OCP\Encryption\IManager; use OCP\Encryption\Keys\IStorage; @@ -344,6 +345,16 @@ class Encryption extends Wrapper { if ($shouldEncrypt === true && $encryptionModule !== null) { $this->encryptedPaths->set($this->util->stripPartialFileExtension($path), true); $headerSize = $this->getHeaderSize($path); + if ($mode === 'r' && $headerSize === 0) { + $firstBlock = $this->readFirstBlock($path); + if (!$firstBlock) { + throw new InvalidHeaderException("Unable to get header block for $path"); + } elseif (!str_starts_with($firstBlock, Util::HEADER_START)) { + throw new InvalidHeaderException("Unable to get header size for $path, file doesn't start with encryption header"); + } else { + throw new InvalidHeaderException("Unable to get header size for $path, even though file does start with encryption header"); + } + } $source = $this->storage->fopen($path, $mode); if (!is_resource($source)) { return false; @@ -894,4 +905,16 @@ class Encryption extends Wrapper { public function setEnabled(bool $enabled): void { $this->enabled = $enabled; } + + /** + * Check if the on-disk data for a file has a valid encrypted header + * + * @param string $path + * @return bool + */ + public function hasValidHeader(string $path): bool { + $firstBlock = $this->readFirstBlock($path); + $header = $this->util->parseRawHeader($firstBlock); + return (count($header) > 0); + } } diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php index 3be77ba1b37..35a265f8c8e 100644 --- a/lib/private/Files/Storage/Wrapper/Quota.php +++ b/lib/private/Files/Storage/Wrapper/Quota.php @@ -21,6 +21,7 @@ class Quota extends Wrapper { protected string $sizeRoot; private SystemConfig $config; private bool $quotaIncludeExternalStorage; + private bool $enabled = true; /** * @param array $parameters @@ -46,6 +47,9 @@ class Quota extends Wrapper { } private function hasQuota(): bool { + if (!$this->enabled) { + return false; + } return $this->getQuota() !== FileInfo::SPACE_UNLIMITED; } @@ -197,4 +201,8 @@ class Quota extends Wrapper { return parent::touch($path, $mtime); } + + public function enableQuota(bool $enabled): void { + $this->enabled = $enabled; + } } diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index f17ced1611b..e49043355e8 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -10,6 +10,7 @@ namespace OC\Files; use Icewind\Streams\CallbackWrapper; use OC\Files\Mount\MoveableMount; use OC\Files\Storage\Storage; +use OC\Files\Storage\Wrapper\Quota; use OC\Share\Share; use OC\User\LazyUser; use OC\User\Manager as UserManager; @@ -1578,12 +1579,22 @@ class View { // Create parent folders if the mountpoint is inside a subfolder that doesn't exist yet if (!isset($files[$entryName])) { try { + [$storage, ] = $this->resolvePath($path . '/' . $entryName); + // make sure we can create the mountpoint folder, even if the user has a quota of 0 + if ($storage->instanceOfStorage(Quota::class)) { + $storage->enableQuota(false); + } + if ($this->mkdir($path . '/' . $entryName) !== false) { $info = $this->getFileInfo($path . '/' . $entryName); if ($info !== false) { $files[$entryName] = $info; } } + + if ($storage->instanceOfStorage(Quota::class)) { + $storage->enableQuota(true); + } } catch (\Exception $e) { // Creating the parent folder might not be possible, for example due to a lack of permissions. $this->logger->debug('Failed to create non-existent parent', ['exception' => $e, 'path' => $path . '/' . $entryName]); diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index a257bc4f7b5..e1eebe1e450 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share20; use OC\Files\Cache\Cache; @@ -31,6 +32,7 @@ use OCP\Share\IAttributes; use OCP\Share\IManager; use OCP\Share\IShare; use OCP\Share\IShareProviderSupportsAccept; +use OCP\Share\IShareProviderSupportsAllSharesInFolder; use OCP\Share\IShareProviderWithNotification; use Psr\Log\LoggerInterface; use function str_starts_with; @@ -40,7 +42,7 @@ use function str_starts_with; * * @package OC\Share20 */ -class DefaultShareProvider implements IShareProviderWithNotification, IShareProviderSupportsAccept { +class DefaultShareProvider implements IShareProviderWithNotification, IShareProviderSupportsAccept, IShareProviderSupportsAllSharesInFolder { // Special share type for user modified group shares public const SHARE_TYPE_USERGROUP = 2; @@ -603,6 +605,17 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv throw new \Exception('non-shallow getSharesInFolder is no longer supported'); } + return $this->getSharesInFolderInternal($userId, $node, $reshares); + } + + public function getAllSharesInFolder(Folder $node): array { + return $this->getSharesInFolderInternal(null, $node, null); + } + + /** + * @return array<int, list<IShare>> + */ + private function getSharesInFolderInternal(?string $userId, Folder $node, ?bool $reshares): array { $qb = $this->dbConn->getQueryBuilder(); $qb->select('s.*', 'f.fileid', 'f.path', 'f.permissions AS f_permissions', 'f.storage', 'f.path_hash', @@ -613,18 +626,20 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv $qb->andWhere($qb->expr()->in('share_type', $qb->createNamedParameter([IShare::TYPE_USER, IShare::TYPE_GROUP, IShare::TYPE_LINK], IQueryBuilder::PARAM_INT_ARRAY))); - /** - * Reshares for this user are shares where they are the owner. - */ - if ($reshares === false) { - $qb->andWhere($qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId))); - } else { - $qb->andWhere( - $qb->expr()->orX( - $qb->expr()->eq('uid_owner', $qb->createNamedParameter($userId)), - $qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId)) - ) - ); + if ($userId !== null) { + /** + * Reshares for this user are shares where they are the owner. + */ + if ($reshares !== true) { + $qb->andWhere($qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId))); + } else { + $qb->andWhere( + $qb->expr()->orX( + $qb->expr()->eq('uid_owner', $qb->createNamedParameter($userId)), + $qb->expr()->eq('uid_initiator', $qb->createNamedParameter($userId)) + ) + ); + } } // todo? maybe get these from the oc_mounts table @@ -656,7 +671,6 @@ class DefaultShareProvider implements IShareProviderWithNotification, IShareProv foreach ($chunks as $chunk) { $qb->setParameter('chunk', $chunk, IQueryBuilder::PARAM_INT_ARRAY); - $a = $qb->getSQL(); $cursor = $qb->executeQuery(); while ($data = $cursor->fetch()) { $shares[$data['fileid']][] = $this->createShare($data); diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 3b247475afa..2104c07593a 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -51,6 +51,7 @@ use OCP\Share\IProviderFactory; use OCP\Share\IShare; use OCP\Share\IShareProvider; use OCP\Share\IShareProviderSupportsAccept; +use OCP\Share\IShareProviderSupportsAllSharesInFolder; use OCP\Share\IShareProviderWithNotification; use Psr\Log\LoggerInterface; @@ -1213,11 +1214,13 @@ class Manager implements IManager { $shares = []; foreach ($providers as $provider) { if ($isOwnerless) { - foreach ($node->getDirectoryListing() as $childNode) { - $data = $provider->getSharesByPath($childNode); - $fid = $childNode->getId(); - $shares[$fid] ??= []; - $shares[$fid] = array_merge($shares[$fid], $data); + // If the provider does not implement the additional interface, + // we lack a performant way of querying all shares and therefore ignore the provider. + if ($provider instanceof IShareProviderSupportsAllSharesInFolder) { + foreach ($provider->getAllSharesInFolder($node) as $fid => $data) { + $shares[$fid] ??= []; + $shares[$fid] = array_merge($shares[$fid], $data); + } } } else { foreach ($provider->getSharesInFolder($userId, $node, $reshares) as $fid => $data) { diff --git a/lib/public/Calendar/ICalendarIsEnabled.php b/lib/public/Calendar/ICalendarIsEnabled.php new file mode 100644 index 00000000000..868159d208f --- /dev/null +++ b/lib/public/Calendar/ICalendarIsEnabled.php @@ -0,0 +1,24 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Calendar; + +/** + * ICalendar Interface Extension + * + * @since 32.0.0 + */ +interface ICalendarIsEnabled { + + /** + * Indicates whether the calendar is enabled + * + * @since 32.0.0 + */ + public function isEnabled(): bool; + +} diff --git a/lib/public/Encryption/Exceptions/InvalidHeaderException.php b/lib/public/Encryption/Exceptions/InvalidHeaderException.php new file mode 100644 index 00000000000..f7213577fb6 --- /dev/null +++ b/lib/public/Encryption/Exceptions/InvalidHeaderException.php @@ -0,0 +1,17 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ +namespace OCP\Encryption\Exceptions; + +use OCP\HintException; + +/** + * Class InvalidHeaderException + * + * @since 32.0.0 + */ +class InvalidHeaderException extends HintException { +} diff --git a/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php b/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php new file mode 100644 index 00000000000..e27da7682ce --- /dev/null +++ b/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php @@ -0,0 +1,24 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Share; + +use OCP\Files\Folder; + +/** + * Allows defining a IShareProvider with support for the getAllSharesInFolder method. + * + * @since 32.0.0 + */ +interface IShareProviderSupportsAllSharesInFolder extends IShareProvider { + /** + * Get all shares in a folder. + * + * @return array<int, list<IShare>> + * @since 32.0.0 + */ + public function getAllSharesInFolder(Folder $node): array; +} |