ApplicationLibrary.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. using LibHac;
  2. using LibHac.Common;
  3. using LibHac.Common.Keys;
  4. using LibHac.Fs;
  5. using LibHac.Fs.Fsa;
  6. using LibHac.FsSystem;
  7. using LibHac.Ns;
  8. using LibHac.Tools.Fs;
  9. using LibHac.Tools.FsSystem;
  10. using LibHac.Tools.FsSystem.NcaUtils;
  11. using Ryujinx.Common.Configuration;
  12. using Ryujinx.Common.Logging;
  13. using Ryujinx.Configuration.System;
  14. using Ryujinx.HLE.FileSystem;
  15. using Ryujinx.HLE.HOS;
  16. using Ryujinx.HLE.HOS.SystemState;
  17. using Ryujinx.HLE.Loaders.Npdm;
  18. using System;
  19. using System.Collections.Generic;
  20. using System.IO;
  21. using System.Reflection;
  22. using System.Text;
  23. using System.Text.Json;
  24. using JsonHelper = Ryujinx.Common.Utilities.JsonHelper;
  25. using Path = System.IO.Path;
  26. namespace Ryujinx.Ui.App
  27. {
  28. public class ApplicationLibrary
  29. {
  30. public event EventHandler<ApplicationAddedEventArgs> ApplicationAdded;
  31. public event EventHandler<ApplicationCountUpdatedEventArgs> ApplicationCountUpdated;
  32. private readonly byte[] _nspIcon;
  33. private readonly byte[] _xciIcon;
  34. private readonly byte[] _ncaIcon;
  35. private readonly byte[] _nroIcon;
  36. private readonly byte[] _nsoIcon;
  37. private VirtualFileSystem _virtualFileSystem;
  38. private Language _desiredTitleLanguage;
  39. public ApplicationLibrary(VirtualFileSystem virtualFileSystem)
  40. {
  41. _virtualFileSystem = virtualFileSystem;
  42. _nspIcon = GetResourceBytes("Ryujinx.Ui.Resources.Icon_NSP.png");
  43. _xciIcon = GetResourceBytes("Ryujinx.Ui.Resources.Icon_XCI.png");
  44. _ncaIcon = GetResourceBytes("Ryujinx.Ui.Resources.Icon_NCA.png");
  45. _nroIcon = GetResourceBytes("Ryujinx.Ui.Resources.Icon_NRO.png");
  46. _nsoIcon = GetResourceBytes("Ryujinx.Ui.Resources.Icon_NSO.png");
  47. }
  48. private byte[] GetResourceBytes(string resourceName)
  49. {
  50. Stream resourceStream = Assembly.GetCallingAssembly().GetManifestResourceStream(resourceName);
  51. byte[] resourceByteArray = new byte[resourceStream.Length];
  52. resourceStream.Read(resourceByteArray);
  53. return resourceByteArray;
  54. }
  55. public IEnumerable<string> GetFilesInDirectory(string directory)
  56. {
  57. Stack<string> stack = new Stack<string>();
  58. stack.Push(directory);
  59. while (stack.Count > 0)
  60. {
  61. string dir = stack.Pop();
  62. string[] content = Array.Empty<string>();
  63. try
  64. {
  65. content = Directory.GetFiles(dir, "*");
  66. }
  67. catch (UnauthorizedAccessException)
  68. {
  69. Logger.Warning?.Print(LogClass.Application, $"Failed to get access to directory: \"{dir}\"");
  70. }
  71. if (content.Length > 0)
  72. {
  73. foreach (string file in content)
  74. {
  75. yield return file;
  76. }
  77. }
  78. try
  79. {
  80. content = Directory.GetDirectories(dir);
  81. }
  82. catch (UnauthorizedAccessException)
  83. {
  84. Logger.Warning?.Print(LogClass.Application, $"Failed to get access to directory: \"{dir}\"");
  85. }
  86. if (content.Length > 0)
  87. {
  88. foreach (string subdir in content)
  89. {
  90. stack.Push(subdir);
  91. }
  92. }
  93. }
  94. }
  95. public void ReadControlData(IFileSystem controlFs, Span<byte> outProperty)
  96. {
  97. using var controlFile = new UniqueRef<IFile>();
  98. controlFs.OpenFile(ref controlFile.Ref(), "/control.nacp".ToU8Span(), OpenMode.Read).ThrowIfFailure();
  99. controlFile.Get.Read(out _, 0, outProperty, ReadOption.None).ThrowIfFailure();
  100. }
  101. public void LoadApplications(List<string> appDirs, Language desiredTitleLanguage)
  102. {
  103. int numApplicationsFound = 0;
  104. int numApplicationsLoaded = 0;
  105. _desiredTitleLanguage = desiredTitleLanguage;
  106. // Builds the applications list with paths to found applications
  107. List<string> applications = new List<string>();
  108. foreach (string appDir in appDirs)
  109. {
  110. if (!Directory.Exists(appDir))
  111. {
  112. Logger.Warning?.Print(LogClass.Application, $"The \"game_dirs\" section in \"Config.json\" contains an invalid directory: \"{appDir}\"");
  113. continue;
  114. }
  115. foreach (string app in GetFilesInDirectory(appDir))
  116. {
  117. if ((Path.GetExtension(app).ToLower() == ".nsp") ||
  118. (Path.GetExtension(app).ToLower() == ".pfs0") ||
  119. (Path.GetExtension(app).ToLower() == ".xci") ||
  120. (Path.GetExtension(app).ToLower() == ".nca") ||
  121. (Path.GetExtension(app).ToLower() == ".nro") ||
  122. (Path.GetExtension(app).ToLower() == ".nso"))
  123. {
  124. applications.Add(app);
  125. numApplicationsFound++;
  126. }
  127. }
  128. }
  129. // Loops through applications list, creating a struct and then firing an event containing the struct for each application
  130. foreach (string applicationPath in applications)
  131. {
  132. double fileSize = new FileInfo(applicationPath).Length * 0.000000000931;
  133. string titleName = "Unknown";
  134. string titleId = "0000000000000000";
  135. string developer = "Unknown";
  136. string version = "0";
  137. byte[] applicationIcon = null;
  138. BlitStruct<ApplicationControlProperty> controlHolder = new BlitStruct<ApplicationControlProperty>(1);
  139. try
  140. {
  141. using (FileStream file = new FileStream(applicationPath, FileMode.Open, FileAccess.Read))
  142. {
  143. if ((Path.GetExtension(applicationPath).ToLower() == ".nsp") ||
  144. (Path.GetExtension(applicationPath).ToLower() == ".pfs0") ||
  145. (Path.GetExtension(applicationPath).ToLower() == ".xci"))
  146. {
  147. try
  148. {
  149. PartitionFileSystem pfs;
  150. bool isExeFs = false;
  151. if (Path.GetExtension(applicationPath).ToLower() == ".xci")
  152. {
  153. Xci xci = new Xci(_virtualFileSystem.KeySet, file.AsStorage());
  154. pfs = xci.OpenPartition(XciPartitionType.Secure);
  155. }
  156. else
  157. {
  158. pfs = new PartitionFileSystem(file.AsStorage());
  159. // If the NSP doesn't have a main NCA, decrement the number of applications found and then continue to the next application.
  160. bool hasMainNca = false;
  161. foreach (DirectoryEntryEx fileEntry in pfs.EnumerateEntries("/", "*"))
  162. {
  163. if (Path.GetExtension(fileEntry.FullPath).ToLower() == ".nca")
  164. {
  165. using var ncaFile = new UniqueRef<IFile>();
  166. pfs.OpenFile(ref ncaFile.Ref(), fileEntry.FullPath.ToU8Span(), OpenMode.Read).ThrowIfFailure();
  167. Nca nca = new Nca(_virtualFileSystem.KeySet, ncaFile.Get.AsStorage());
  168. int dataIndex = Nca.GetSectionIndexFromType(NcaSectionType.Data, NcaContentType.Program);
  169. // Some main NCAs don't have a data partition, so check if the partition exists before opening it
  170. if (nca.Header.ContentType == NcaContentType.Program && !(nca.SectionExists(NcaSectionType.Data) && nca.Header.GetFsHeader(dataIndex).IsPatchSection()))
  171. {
  172. hasMainNca = true;
  173. break;
  174. }
  175. }
  176. else if (Path.GetFileNameWithoutExtension(fileEntry.FullPath) == "main")
  177. {
  178. isExeFs = true;
  179. }
  180. }
  181. if (!hasMainNca && !isExeFs)
  182. {
  183. numApplicationsFound--;
  184. continue;
  185. }
  186. }
  187. if (isExeFs)
  188. {
  189. applicationIcon = _nspIcon;
  190. using var npdmFile = new UniqueRef<IFile>();
  191. Result result = pfs.OpenFile(ref npdmFile.Ref(), "/main.npdm".ToU8Span(), OpenMode.Read);
  192. if (ResultFs.PathNotFound.Includes(result))
  193. {
  194. Npdm npdm = new Npdm(npdmFile.Get.AsStream());
  195. titleName = npdm.TitleName;
  196. titleId = npdm.Aci0.TitleId.ToString("x16");
  197. }
  198. }
  199. else
  200. {
  201. GetControlFsAndTitleId(pfs, out IFileSystem controlFs, out titleId);
  202. // Check if there is an update available.
  203. if (IsUpdateApplied(titleId, out IFileSystem updatedControlFs))
  204. {
  205. // Replace the original ControlFs by the updated one.
  206. controlFs = updatedControlFs;
  207. }
  208. ReadControlData(controlFs, controlHolder.ByteSpan);
  209. GetGameInformation(ref controlHolder.Value, out titleName, out _, out developer, out version);
  210. // Read the icon from the ControlFS and store it as a byte array
  211. try
  212. {
  213. using var icon = new UniqueRef<IFile>();
  214. controlFs.OpenFile(ref icon.Ref(), $"/icon_{_desiredTitleLanguage}.dat".ToU8Span(), OpenMode.Read).ThrowIfFailure();
  215. using (MemoryStream stream = new MemoryStream())
  216. {
  217. icon.Get.AsStream().CopyTo(stream);
  218. applicationIcon = stream.ToArray();
  219. }
  220. }
  221. catch (HorizonResultException)
  222. {
  223. foreach (DirectoryEntryEx entry in controlFs.EnumerateEntries("/", "*"))
  224. {
  225. if (entry.Name == "control.nacp")
  226. {
  227. continue;
  228. }
  229. using var icon = new UniqueRef<IFile>();
  230. controlFs.OpenFile(ref icon.Ref(), entry.FullPath.ToU8Span(), OpenMode.Read).ThrowIfFailure();
  231. using (MemoryStream stream = new MemoryStream())
  232. {
  233. icon.Get.AsStream().CopyTo(stream);
  234. applicationIcon = stream.ToArray();
  235. }
  236. if (applicationIcon != null)
  237. {
  238. break;
  239. }
  240. }
  241. if (applicationIcon == null)
  242. {
  243. applicationIcon = Path.GetExtension(applicationPath).ToLower() == ".xci" ? _xciIcon : _nspIcon;
  244. }
  245. }
  246. }
  247. }
  248. catch (MissingKeyException exception)
  249. {
  250. applicationIcon = Path.GetExtension(applicationPath).ToLower() == ".xci" ? _xciIcon : _nspIcon;
  251. Logger.Warning?.Print(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}");
  252. }
  253. catch (InvalidDataException)
  254. {
  255. applicationIcon = Path.GetExtension(applicationPath).ToLower() == ".xci" ? _xciIcon : _nspIcon;
  256. Logger.Warning?.Print(LogClass.Application, $"The header key is incorrect or missing and therefore the NCA header content type check has failed. Errored File: {applicationPath}");
  257. }
  258. catch (Exception exception)
  259. {
  260. Logger.Warning?.Print(LogClass.Application, $"The file encountered was not of a valid type. File: '{applicationPath}' Error: {exception}");
  261. numApplicationsFound--;
  262. continue;
  263. }
  264. }
  265. else if (Path.GetExtension(applicationPath).ToLower() == ".nro")
  266. {
  267. BinaryReader reader = new BinaryReader(file);
  268. byte[] Read(long position, int size)
  269. {
  270. file.Seek(position, SeekOrigin.Begin);
  271. return reader.ReadBytes(size);
  272. }
  273. try
  274. {
  275. file.Seek(24, SeekOrigin.Begin);
  276. int assetOffset = reader.ReadInt32();
  277. if (Encoding.ASCII.GetString(Read(assetOffset, 4)) == "ASET")
  278. {
  279. byte[] iconSectionInfo = Read(assetOffset + 8, 0x10);
  280. long iconOffset = BitConverter.ToInt64(iconSectionInfo, 0);
  281. long iconSize = BitConverter.ToInt64(iconSectionInfo, 8);
  282. ulong nacpOffset = reader.ReadUInt64();
  283. ulong nacpSize = reader.ReadUInt64();
  284. // Reads and stores game icon as byte array
  285. applicationIcon = Read(assetOffset + iconOffset, (int) iconSize);
  286. // Read the NACP data
  287. Read(assetOffset + (int)nacpOffset, (int)nacpSize).AsSpan().CopyTo(controlHolder.ByteSpan);
  288. GetGameInformation(ref controlHolder.Value, out titleName, out titleId, out developer, out version);
  289. }
  290. else
  291. {
  292. applicationIcon = _nroIcon;
  293. titleName = Path.GetFileNameWithoutExtension(applicationPath);
  294. }
  295. }
  296. catch
  297. {
  298. Logger.Warning?.Print(LogClass.Application, $"The file encountered was not of a valid type. Errored File: {applicationPath}");
  299. numApplicationsFound--;
  300. continue;
  301. }
  302. }
  303. else if (Path.GetExtension(applicationPath).ToLower() == ".nca")
  304. {
  305. try
  306. {
  307. Nca nca = new Nca(_virtualFileSystem.KeySet, new FileStream(applicationPath, FileMode.Open, FileAccess.Read).AsStorage());
  308. int dataIndex = Nca.GetSectionIndexFromType(NcaSectionType.Data, NcaContentType.Program);
  309. if (nca.Header.ContentType != NcaContentType.Program || (nca.SectionExists(NcaSectionType.Data) && nca.Header.GetFsHeader(dataIndex).IsPatchSection()))
  310. {
  311. numApplicationsFound--;
  312. continue;
  313. }
  314. }
  315. catch (InvalidDataException)
  316. {
  317. Logger.Warning?.Print(LogClass.Application, $"The NCA header content type check has failed. This is usually because the header key is incorrect or missing. Errored File: {applicationPath}");
  318. }
  319. catch
  320. {
  321. Logger.Warning?.Print(LogClass.Application, $"The file encountered was not of a valid type. Errored File: {applicationPath}");
  322. numApplicationsFound--;
  323. continue;
  324. }
  325. applicationIcon = _ncaIcon;
  326. titleName = Path.GetFileNameWithoutExtension(applicationPath);
  327. }
  328. // If its an NSO we just set defaults
  329. else if (Path.GetExtension(applicationPath).ToLower() == ".nso")
  330. {
  331. applicationIcon = _nsoIcon;
  332. titleName = Path.GetFileNameWithoutExtension(applicationPath);
  333. }
  334. }
  335. }
  336. catch (IOException exception)
  337. {
  338. Logger.Warning?.Print(LogClass.Application, exception.Message);
  339. numApplicationsFound--;
  340. continue;
  341. }
  342. ApplicationMetadata appMetadata = LoadAndSaveMetaData(titleId);
  343. if (appMetadata.LastPlayed != "Never" && !DateTime.TryParse(appMetadata.LastPlayed, out _))
  344. {
  345. Logger.Warning?.Print(LogClass.Application, $"Last played datetime \"{appMetadata.LastPlayed}\" is invalid for current system culture, skipping (did current culture change?)");
  346. appMetadata.LastPlayed = "Never";
  347. }
  348. ApplicationData data = new ApplicationData
  349. {
  350. Favorite = appMetadata.Favorite,
  351. Icon = applicationIcon,
  352. TitleName = titleName,
  353. TitleId = titleId,
  354. Developer = developer,
  355. Version = version,
  356. TimePlayed = ConvertSecondsToReadableString(appMetadata.TimePlayed),
  357. LastPlayed = appMetadata.LastPlayed,
  358. FileExtension = Path.GetExtension(applicationPath).ToUpper().Remove(0, 1),
  359. FileSize = (fileSize < 1) ? (fileSize * 1024).ToString("0.##") + "MB" : fileSize.ToString("0.##") + "GB",
  360. Path = applicationPath,
  361. ControlHolder = controlHolder
  362. };
  363. numApplicationsLoaded++;
  364. OnApplicationAdded(new ApplicationAddedEventArgs()
  365. {
  366. AppData = data
  367. });
  368. OnApplicationCountUpdated(new ApplicationCountUpdatedEventArgs()
  369. {
  370. NumAppsFound = numApplicationsFound,
  371. NumAppsLoaded = numApplicationsLoaded
  372. });
  373. }
  374. OnApplicationCountUpdated(new ApplicationCountUpdatedEventArgs()
  375. {
  376. NumAppsFound = numApplicationsFound,
  377. NumAppsLoaded = numApplicationsLoaded
  378. });
  379. }
  380. protected void OnApplicationAdded(ApplicationAddedEventArgs e)
  381. {
  382. ApplicationAdded?.Invoke(null, e);
  383. }
  384. protected void OnApplicationCountUpdated(ApplicationCountUpdatedEventArgs e)
  385. {
  386. ApplicationCountUpdated?.Invoke(null, e);
  387. }
  388. private void GetControlFsAndTitleId(PartitionFileSystem pfs, out IFileSystem controlFs, out string titleId)
  389. {
  390. (_, _, Nca controlNca) = ApplicationLoader.GetGameData(_virtualFileSystem, pfs, 0);
  391. // Return the ControlFS
  392. controlFs = controlNca?.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.None);
  393. titleId = controlNca?.Header.TitleId.ToString("x16");
  394. }
  395. internal ApplicationMetadata LoadAndSaveMetaData(string titleId, Action<ApplicationMetadata> modifyFunction = null)
  396. {
  397. string metadataFolder = Path.Combine(AppDataManager.GamesDirPath, titleId, "gui");
  398. string metadataFile = Path.Combine(metadataFolder, "metadata.json");
  399. ApplicationMetadata appMetadata;
  400. if (!File.Exists(metadataFile))
  401. {
  402. Directory.CreateDirectory(metadataFolder);
  403. appMetadata = new ApplicationMetadata();
  404. using (FileStream stream = File.Create(metadataFile, 4096, FileOptions.WriteThrough))
  405. {
  406. JsonHelper.Serialize(stream, appMetadata, true);
  407. }
  408. }
  409. try
  410. {
  411. appMetadata = JsonHelper.DeserializeFromFile<ApplicationMetadata>(metadataFile);
  412. }
  413. catch (JsonException)
  414. {
  415. Logger.Warning?.Print(LogClass.Application, $"Failed to parse metadata json for {titleId}. Loading defaults.");
  416. appMetadata = new ApplicationMetadata();
  417. }
  418. if (modifyFunction != null)
  419. {
  420. modifyFunction(appMetadata);
  421. using (FileStream stream = File.Create(metadataFile, 4096, FileOptions.WriteThrough))
  422. {
  423. JsonHelper.Serialize(stream, appMetadata, true);
  424. }
  425. }
  426. return appMetadata;
  427. }
  428. private string ConvertSecondsToReadableString(double seconds)
  429. {
  430. const int secondsPerMinute = 60;
  431. const int secondsPerHour = secondsPerMinute * 60;
  432. const int secondsPerDay = secondsPerHour * 24;
  433. string readableString;
  434. if (seconds < secondsPerMinute)
  435. {
  436. readableString = $"{seconds}s";
  437. }
  438. else if (seconds < secondsPerHour)
  439. {
  440. readableString = $"{Math.Round(seconds / secondsPerMinute, 2, MidpointRounding.AwayFromZero)} mins";
  441. }
  442. else if (seconds < secondsPerDay)
  443. {
  444. readableString = $"{Math.Round(seconds / secondsPerHour, 2, MidpointRounding.AwayFromZero)} hrs";
  445. }
  446. else
  447. {
  448. readableString = $"{Math.Round(seconds / secondsPerDay, 2, MidpointRounding.AwayFromZero)} days";
  449. }
  450. return readableString;
  451. }
  452. private void GetGameInformation(ref ApplicationControlProperty controlData, out string titleName, out string titleId, out string publisher, out string version)
  453. {
  454. _ = Enum.TryParse(_desiredTitleLanguage.ToString(), out TitleLanguage desiredTitleLanguage);
  455. if (controlData.Title.ItemsRo.Length > (int)desiredTitleLanguage)
  456. {
  457. titleName = controlData.Title[(int)desiredTitleLanguage].NameString.ToString();
  458. publisher = controlData.Title[(int)desiredTitleLanguage].PublisherString.ToString();
  459. }
  460. else
  461. {
  462. titleName = null;
  463. publisher = null;
  464. }
  465. if (string.IsNullOrWhiteSpace(titleName))
  466. {
  467. foreach (ref readonly var controlTitle in controlData.Title.ItemsRo)
  468. {
  469. if (!controlTitle.NameString.IsEmpty())
  470. {
  471. titleName = controlTitle.NameString.ToString();
  472. break;
  473. }
  474. }
  475. }
  476. if (string.IsNullOrWhiteSpace(publisher))
  477. {
  478. foreach (ref readonly var controlTitle in controlData.Title.ItemsRo)
  479. {
  480. if (!controlTitle.PublisherString.IsEmpty())
  481. {
  482. publisher = controlTitle.PublisherString.ToString();
  483. break;
  484. }
  485. }
  486. }
  487. if (controlData.PresenceGroupId != 0)
  488. {
  489. titleId = controlData.PresenceGroupId.ToString("x16");
  490. }
  491. else if (controlData.SaveDataOwnerId != 0)
  492. {
  493. titleId = controlData.SaveDataOwnerId.ToString();
  494. }
  495. else if (controlData.AddOnContentBaseId != 0)
  496. {
  497. titleId = (controlData.AddOnContentBaseId - 0x1000).ToString("x16");
  498. }
  499. else
  500. {
  501. titleId = "0000000000000000";
  502. }
  503. version = controlData.DisplayVersionString.ToString();
  504. }
  505. private bool IsUpdateApplied(string titleId, out IFileSystem updatedControlFs)
  506. {
  507. updatedControlFs = null;
  508. string updatePath = "(unknown)";
  509. try
  510. {
  511. (Nca patchNca, Nca controlNca) = ApplicationLoader.GetGameUpdateData(_virtualFileSystem, titleId, 0, out updatePath);
  512. if (patchNca != null && controlNca != null)
  513. {
  514. updatedControlFs = controlNca?.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.None);
  515. return true;
  516. }
  517. }
  518. catch (InvalidDataException)
  519. {
  520. Logger.Warning?.Print(LogClass.Application,
  521. $"The header key is incorrect or missing and therefore the NCA header content type check has failed. Errored File: {updatePath}");
  522. }
  523. catch (MissingKeyException exception)
  524. {
  525. Logger.Warning?.Print(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}. Errored File: {updatePath}");
  526. }
  527. return false;
  528. }
  529. }
  530. }