changeset 4031:0d7f32465289

Fix crash when saving hash data; Help updates
author eMTee <emtee11@gmail.com>
date Sat, 07 Jun 2025 13:08:26 +0200
parents 365a0f9e4ed6
children 4711aa279594
files changelog.txt dcpp/HashManager.cpp help/faq_connection.html help/window_system_log.html win32/UploadFilteringPage.cpp
diffstat 5 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/changelog.txt	Wed Jun 04 12:12:05 2025 +0200
+++ b/changelog.txt	Sat Jun 07 13:08:26 2025 +0200
@@ -1,3 +1,4 @@
+* Fix a possible crash when saving hash data (emtee)
 * [L#2110291] [ADC] Fix a possible latency in the availability of TTH search results for updated files on hubs with BLOM support (emtee)
 * Ensure that files are always instantly searchable by name after they have been hashed (emtee)
 * [L#2111115] Fix hash pausing so it always works instantly (emtee)
--- a/dcpp/HashManager.cpp	Wed Jun 04 12:12:05 2025 +0200
+++ b/dcpp/HashManager.cpp	Sat Jun 07 13:08:26 2025 +0200
@@ -120,7 +120,7 @@
 	int64_t pos = 0;
 	size_t n = sizeof(pos);
 	if (f.read(&pos, n) != sizeof(pos))
-		throw HashException(_("Unable to read hash data file"));
+		throw FileException(_("Unable to read hash data file"));
 
 	// Check if we should grow the file, we grow by a meg at a time...
 	int64_t datsz = f.getSize();
--- a/help/faq_connection.html	Wed Jun 04 12:12:05 2025 +0200
+++ b/help/faq_connection.html	Sat Jun 07 13:08:26 2025 +0200
@@ -29,7 +29,7 @@
 downloads</b> to work. These settings <b>have no effect on ability to connecting to hubs
 or downloading hublists</b>. This FAQ assumes that <u>you are able to download hublists
 and connect to hubs</u> as well as other peers can upload files from you. If this is not
-true then you must elminate another kind of problems before go on with this FAQ:
+the case, then you must check the following before continuing with this FAQ:
 <ul>
 	<li>Make sure DC++ isn't blocked by any firewall and similar security software. For tips
 	how to workaround this situation and unblock DC++ please follow <a href="faq_unblock.html">
--- a/help/window_system_log.html	Wed Jun 04 12:12:05 2025 +0200
+++ b/help/window_system_log.html	Sat Jun 07 13:08:26 2025 +0200
@@ -38,6 +38,8 @@
 	<dt>Duplicate file will not be shared: [path1] (Size: [size]) Dupe matched against: [path2]</dt>
 	<dd>This means that since you have <a href="settings_advanced.html#listdupes">Keep duplicate files in your file list</a>
 	setting disabled, a file ([path1]) beeing indexed and already shared (as [path2]) won't be added to your share again.</dd>
+	<dt>Hash database rebuild has been scheduled</dt>
+	<dd>A <a href="chat_commands.html">/rebuild</a> command received while the hashing process was paused. The hash database will be rebuilt once hashing is resumed.</dd>
 	<dt>Hash database rebuilt</dt>
 	<dd>Informs you about the finish of a full hash database rebuilding process which can be initiated by the <a href="chat_commands.html">/rebuild</a> chat command</dd>
 	<dt>Disconnected user leaving the hub: [nick]</dt>
@@ -112,9 +114,9 @@
 	<dt>Error hashing [path]: [error message]</dt>
 	<dd>Error when hashing the file specified in [path].</dd>
 	<dt>Error saving hash data: [error message]</dt>
-	<dd>Error when creating or updating hash index file (HashIndex.xml).</dd>
+	<dd>Error when creating or updating hash database files (HashIndex.xml, HashData.dat). This message appearing repeatedly may indicate hash database corruption or issues accessing the <a href="faq_settings_files.html">settings folder or files</a>.</dd>
 	<dt>Error creating hash data file: [error message]</dt>
-	<dd>Error when creating hash data file (HashData.dat).</dd>
+	<dd>Error when creating hash data file (HashData.dat). This message may indicate issues accessing the <a href="faq_settings_files.html">settings folder or files</a>.</dd>
 	<dt>[path] not shared; calculated CRC32 does not match the one found in SFV file.</dt>
 	<dd>Before sharing files DC++ will automatically check them against an .SFV file (if one exists in the same directory) to make sure that no corrupted files will be shared. If you get this error then either your file(s) are corrupted or the control data in the corresponding .SFV file is outdated or damaged.</dd>
 	<dt>Unable to move [path1] to [path2] ([error message]); renamed to [path3]</dt>
--- a/win32/UploadFilteringPage.cpp	Wed Jun 04 12:12:05 2025 +0200
+++ b/win32/UploadFilteringPage.cpp	Sat Jun 07 13:08:26 2025 +0200
@@ -159,9 +159,9 @@
 		ShareManager::getInstance()->updateFilterCache();
 
 		ShareManager::getInstance()->setDirty();
+
+		ShareManager::getInstance()->refresh(true);
 	}
-
-	ShareManager::getInstance()->refresh(isModified());
 }
 
 void UploadFilteringPage::addItem(dwt::Grid* parent, dwt::Control*& control, const tstring& text, int setting, PropPage::Type t, unsigned helpId, const tstring& text2) {