Bug: Virtual Name in Shared files.

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
kattana
Posts: 5
Joined: 2003-11-14 20:47
Contact:

Bug: Virtual Name in Shared files.

Post by kattana » 2004-11-22 19:03

Signing up for the bug reporting doesnt seem to be working so ill post this here.

When adding a shared folder if there is a backslash in the virtual name the file will be unavailable for download. I tested this using BCDC++ 0.666a and DC++ 0.4034.

Example XML from the file list of the the directory with a virtual name containing a backslash:

Code: Select all

<Directory Name="Test\Test">
	<File Name="w5sp_exe_100.zip" Size="63055" TTH="CTTGZNZNCUPGX3MNTFCPL3KVUMF3DRD4JTNWAGA"/>
	<File Name="w2sp4netjuke.zip" Size="27788" TTH="2WDQMP5ZXECMDFNJ4YP56L7RUIORKITUOEDV5KY"/>
	<File Name="w2sp.additionals.zip" Size="124492" TTH="EMHS6Z54HFWTHBLFWU5EJP3V5VHYRAWF7Q3DSSQ"/>
	<File Name="w2sp-2004-04-26.tar.gz" Size="33860" TTH="I66MAWJZ3UBCWPK2JQEPP3RAI6EQDVPUAXHTS6Y"/>
	<File Name="shoutcast-1-9-4-windows.exe" Size="214077" TTH="OG5X6W37XBUAEQYM4UTAOBGTYW3E36ZTUL5Q6OY"/>
	<File Name="foo_winamp_spam-0.74.zip" Size="9562" TTH="AA43KLPO5MGGLOPYHJVNTUWSNKP6VBX6B5YXS6I"/>
	<File Name="amip_foobar07b.zip" Size="544575" TTH="UIDOPBGTZEZJMPIEAU7F4QXHWTA6N43R2ONLDEA"/>
</Directory>
"Test\Test" is the virtual name for "E:\TempFiles\Winamp"

XML from the download queue attempting to download a file from this directory:

Code: Select all

	<Download Target="E:\TempFiles\amip_foobar07b.zip" Size="544575" Priority="3" TempTarget="E:\Programs\DC\DC++\Incomplete\amip_foobar07b.zip.UIDOPBGTZEZJMPIEAU7F4QXHWTA6N43R2ONLDEA.dctmp" Added="1101166400" TTH="UIDOPBGTZEZJMPIEAU7F4QXHWTA6N43R2ONLDEA">
		<Source Nick="Kattanaver" Path="Test\Test\amip_foobar07b.zip" Utf8="1"/>
	</Download>
Notice in the target the virtual name AND real path "Winamp\" are missing. Also as you can see the virtual name is used as the directory name without any filtering and added to the path to the file in the download source.
In addition to fixing the bug I suggest that a backslash in the virtual name be used to denote a virtual subdirectory of the virtual folder, not unlike the submenus created by backslashes in user command names.
I was trying if this feature was already implimented when i stumbled on the bug.
The solution to me is to map the virtual names to the directory paths when sending the path data for downloads. I'm going to look into it but ive never done any C or C++ work.

Gasman1015
Posts: 184
Joined: 2003-05-26 11:29
Location: UK

Post by Gasman1015 » 2004-11-22 19:08

Always remember you're unique, just like everyone else.

kattana
Posts: 5
Joined: 2003-11-14 20:47
Contact:

Post by kattana » 2004-11-22 19:43

Thats appears similar but I dont think its the same, he said the problem occured after downloading, this bug prevents downloading by making the file unavailable.
Is the fix mention in that topic in the cvs, if so i could check if it was inded the same or affected this bug.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-11-23 01:06

The last post currently in that indicates that it is.

Also, in future, please try something out in the most current version of DC++ (0.667 at the moment) before reporting it.
The world is coming to an end. Please log off.

DC++ Guide | Words

kattana
Posts: 5
Joined: 2003-11-14 20:47
Contact:

Post by kattana » 2004-11-23 12:44

With this mornings CVS:

Code: Select all

<Directory Name="Test\Test">
	<File Name="w5sp_exe_100.zip" Size="63055" TTH="CTTGZNZNCUPGX3MNTFCPL3KVUMF3DRD4JTNWAGA"/>
	<File Name="w2sp4netjuke.zip" Size="27788" TTH="2WDQMP5ZXECMDFNJ4YP56L7RUIORKITUOEDV5KY"/>
	<File Name="w2sp.additionals.zip" Size="124492" TTH="EMHS6Z54HFWTHBLFWU5EJP3V5VHYRAWF7Q3DSSQ"/>
	<File Name="w2sp-2004-04-26.tar.gz" Size="33860" TTH="I66MAWJZ3UBCWPK2JQEPP3RAI6EQDVPUAXHTS6Y"/>
	<File Name="shoutcast-1-9-4-windows.exe" Size="214077" TTH="OG5X6W37XBUAEQYM4UTAOBGTYW3E36ZTUL5Q6OY"/>
	<File Name="foo_winamp_spam-0.74.zip" Size="9562" TTH="AA43KLPO5MGGLOPYHJVNTUWSNKP6VBX6B5YXS6I"/>
	<File Name="amip_foobar07b.zip" Size="544575" TTH="UIDOPBGTZEZJMPIEAU7F4QXHWTA6N43R2ONLDEA"/>
</Directory>

Code: Select all

	<Download Target="E:\TempFiles\amip_foobar07b.zip" Size="544575" Priority="3" TempTarget="E:\Programs\DC\DC++\Incomplete\amip_foobar07b.zip.UIDOPBGTZEZJMPIEAU7F4QXHWTA6N43R2ONLDEA.dctmp" Added="1101232048" TTH="UIDOPBGTZEZJMPIEAU7F4QXHWTA6N43R2ONLDEA">
		<Source Nick="Kattanaver" Path="Test\Test\amip_foobar07b.zip" Utf8="1"/>
	</Download>
The Bug is still there.
Additionaly in the download queue it treats the backslash as a folder division and creates a subdirectory(s) when you download the whole folder. A quick fix for it would be to just disallow characters that are not allowed in file or folder names. That will fix it while i learn C++ to impliment the virtual subdirectory feature and map the virtual name to the actual directory path.

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2004-11-23 15:20

Should use the '/' character instead of backslash because it's more l33t and ADC-like :)

kattana
Posts: 5
Joined: 2003-11-14 20:47
Contact:

Post by kattana » 2004-11-23 18:54

PseudonympH wrote:Should use the '/' character instead of backslash because it's more l33t and ADC-like :)
Alright then, please replace all occurences of "backslash" with "forwardslash" and "" with "/" in the part of my posts regarding the new feature.

Update: forward slashes cause the same file not available error.

kattana
Posts: 5
Joined: 2003-11-14 20:47
Contact:

Post by kattana » 2004-11-23 21:45

To whoever beat me to submiting a patch; a pox on you! :(

Locked