Official eMule-Board: Unsharing Single Shared Files - Official eMule-Board

Jump to content


Page 1 of 1

Unsharing Single Shared Files Unshare rather than exclude

#1 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 10 April 2009 - 06:34 PM

Hey,

doing some researches in the code and some testing on top I noticed that the official client will exclude single shared files as soon as you uncheck the checkbox (or unshare them using the context menu). Now, when you just want to unshare the file it is of no further concern. The problem starts somewhere else; if you try to share the complete folder the now excluded file will not be shared although you may want to have it shared. Fixing this from within eMule is possible (browse to the proper folder in the SharedFilesWnd and check the box again) but IMO it is kinda unlogic this way.

So here I'll post you the two or three additional lines of code that will fix this for you. First of all, open SharedFileList.cpp and go to "bool CSharedFileList::ExcludeFile(CString strFilePath)". Now see below for the additional lines (they are tagged in Morph style... apparently ;)):
	//MORPH START - Added by Stulle, Only exclude file if it was not single shared
	bool bSingleShared = bShared;
	//MORPH END   - Added by Stulle, Only exlcude file if it was not single shared

	// check if we implicity share this file
	bShared |= ShouldBeShared(strFilePath.Left(strFilePath.ReverseFind('\\') + 1), strFilePath, false);


and

	// add to exclude list
	//MORPH START - Added by Stulle, Only exclude file if it was not single shared
	if(!bSingleShared)
	//MORPH END   - Added by Stulle, Only exlcude file if it was not single shared
		m_liSingleExcludedFiles.AddTail(strFilePath);


Well, this is really boring and lame but I thought I'd share this snippet with you... and probably the officials think alike myself and change this, too. ;)

Have fun,
Stulle
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#2 User is offline   Wulp 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1860
  • Joined: 08-July 05

Posted 10 April 2009 - 09:08 PM

Seems the exclude entries will disappear after a restart.
But it can still be a bit problematic if you don't restart your emule very often, because I think they remain exluded if you share the folder where they are in before a restart.
0

#3 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 11 April 2009 - 07:14 AM

to be honest, i did not check this or tried this... it just occured to me as described above so i changed it. ;)
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

#4 User is offline   fox88 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 4974
  • Joined: 13-May 07

Posted 11 April 2009 - 02:20 PM

View PostStulle, on Apr 11 2009, 11:14 AM, said:

i did not check this or tried this

Description of this subforum says: To post validated fixes & important addons (only!)
Otherwise it should be in Development, IMHO. :)
0

#5 User is offline   Stulle 

  • [Enter Mod] Dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5804
  • Joined: 07-April 04

Posted 11 April 2009 - 07:21 PM

this fix is valid and it fixes it at least session wise which i confirmed to be not working with the original code. if the original code works for multiple sessions, this code will not break this.
I am an emule-web.de member and fan!

[Imagine there was a sarcasm meter right here!]

No, there will not be a new version of my mods. No, I do not want your PM. No, I am certain, use the board and quit sending PMs. No, I am not kidding, there will not be a new version of my mods just because of YOU asking for it!
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users