@@ -74,27 +74,27 @@ Future<dynamic> readExternalPod(
7474 // Get master key from the user if required
7575 await getKeyFromUserIfRequired (context, child);
7676
77- Key ? indKey;
78-
79- // Decrypt if reading an encrypted file
80- if (await KeyManager .hasSharedIndividualKey (fileUrl)) {
81- // Get the individual key for the file
82- indKey = await KeyManager .getSharedIndividualKey (fileUrl);
83- } else if (hasInheritedKey (
77+ Key ? indKey;
78+
79+ // Decrypt if reading an encrypted file
80+ if (await KeyManager .hasSharedIndividualKey (fileUrl)) {
81+ // Get the individual key for the file
82+ indKey = await KeyManager .getSharedIndividualKey (fileUrl);
83+ } else if (hasInheritedKey (
84+ fileContent,
85+ fileUrl,
86+ )) {
87+ // Get the individual key for the file
88+ final parentDirPath = getParentDir (
8489 fileContent,
8590 fileUrl,
86- )) {
87- // Get the individual key for the file
88- final parentDirPath = getParentDir (
89- fileContent,
90- fileUrl,
91- );
92- final parentDirUrl = getExtDirUrl (fileUrl, parentDirPath);
93- indKey = await KeyManager .getSharedIndividualKey (parentDirUrl);
94- }
95-
96- if (indKey != null ) {
97- // Decrypt the file content
91+ );
92+ final parentDirUrl = getExtDirUrl (fileUrl, parentDirPath);
93+ indKey = await KeyManager .getSharedIndividualKey (parentDirUrl);
94+ }
95+
96+ if (indKey != null ) {
97+ // Decrypt the file content
9898
9999 final dataMap = parseTTL (fileContent);
100100 assert (dataMap.containsKey (fileUrl));
0 commit comments