How can I rename files without rehashing

Asked by -

I want to rename some files in my share without having to rehash them.
Is this currently possible?

Question information

English Edit question
LinuxDC++ Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olorin (vivliofika) said :

no way. Does the file if more than 1Tb?

You can also make a patch for torrent-style file moving with the DC-client programm.

Revision history for this message
Steven Sheehy (steven-sheehy) said :

I'm not sure there's any way around this. For example, let's say you had a file called A.txt. You stepped away from your computer and when you came back there was a file called B.txt and no A.txt. The only way you would know whether it was the same file would be to open it and examine its contents (e.g. hash it). This is what DC++ does. The only other possible way that I can think of is to examine the file's inode to see if it changed.

So short answer: no, you can't currently do it.
Long answer: possibly by changing the code to examine the file's inode, so you may want to check with the DC++ people to see if they'd consider this.

Revision history for this message
- (gghhoosstt-deactivatedaccount) said :

Thanks for your answers.
An easier way to do this, in my opinion, would be to provide a rename function in the GUI, e.g. by rightclicking on a file in my filelist and selecting "Rename". This function could rename the file and change the name in the filelist, pointing to the filehash.
What do you think?

Revision history for this message
Steven Sheehy (steven-sheehy) said :

That seems reasonable, but not sure how intuitive that would be for the user. Most users rename files via command line or a file manager. Adding this functionality to the share browser would solve your problem but I don't know how many users would know to use this option. Plus it starts to make linuxdcpp into more a file manager instead of a p2p client (violating the whole unix philosophy of "do one thing and do it well"). It looks like it would require core changes to accomplish, so not sure how easy it is.

Is it really that much of a bother to rehash an occasional file? The core recently added the ability to allow the user to pause hashing and that will be making its way to linuxdcpp soon. That may help if your problem is not with rehashing but with the fact that it's hashing and using your resources when you're utilizing the computer.

If you still want the option, feel free to create a bug report from this question and assign it to both linuxdcpp and dcplusplus projects.

Can you help with this problem?

Provide an answer of your own, or ask - for more information if necessary.

To post a message you must log in.