Share is broken on >= 0.760

Bug #548743 reported by netcelli-tux
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DC++
Fix Released
High
Steven Sheehy

Bug Description

Share doesn't work anymore with Last core on Linux. That is because of new check for hidden files (http://bazaar.launchpad.net/~dcplusplus-team/dcplusplus/trunk/revision/1903#dcpp/ShareManager.cpp and https://bugs.launchpad.net/dcplusplus/+bug/338888)
d_name memeber of dirent struct returns always "." when called on a folder so DirData::isHidden() return always true. That means no folder can be added to share and also current shared folders aren't shared if "Share hidden files" is false.

Related branches

Revision history for this message
eMTee (realprogger) wrote :

Guess for non-win32 there's an easier way to decide if the directory is hidden or not, just test the first char of the directory name for period, like in the attached patch (not tested). Any thoughts?

Revision history for this message
netcelli-tux (netcelli-tux) wrote :

That is right. Hidden files and directories start with a dot. I will test the patch and let you know

Revision history for this message
netcelli-tux (netcelli-tux) wrote :

The patch doesn't work. Correct solution would be return(BOOLSETTING(SHARE_HIDDEN) || !(Util::getLastDir(aName)[0] == '.'))
Dir path should end with '/' or it doesn't work.

Revision history for this message
eMTee (realprogger) wrote :

Ok, but before commit I'd wait for an approval from the LinuxDC++ guys, too...

Revision history for this message
Razzloss (razzloss) wrote :

Can't check the source since I'm sitting in a train, but is this same function used for checking for hidden files also? If it is it seems that those would be missed by the patch, since only the containing dir name is checked, not the filename. (getLastDir returns the last directory not the last path component?)

offtopic, netcelli what are using for UI if you're running 0.760 core?

--RZ

Revision history for this message
netcelli-tux (netcelli-tux) wrote :

I'm using my own UI developed with QT.

Revision history for this message
poy (poy) wrote :

it might be better to update FileFindIter itself rather than this particular occurence of it.

there is another place in ShareManager where i have re-used FileFindIter, i hope it doesn't fall under these same problems...

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

netcelli, can you test this patch? If it works for you I'll go ahead and commit it.

By the way, is your client an update of dc-qt or is it brand new? If the latter, do you have a project website yet?

Revision history for this message
netcelli-tux (netcelli-tux) wrote :

It is a new project and it is not released yet because few things are still not usable for end-users.
Patch doesn't work because file to patch isn't File.h but ShareManager.cpp. I did those changes by myself, now compiling and test.

Revision history for this message
netcelli-tux (netcelli-tux) wrote :

Everything works.

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

Someone moved FileFindIter to File.h in latest trunk, which is why it didn't apply cleanly to 0.760. Commited the fix to trunk.

Changed in dcplusplus:
assignee: nobody → Steven Sheehy (steven-sheehy)
importance: Undecided → High
status: New → Fix Committed
tags: added: core regression share
Revision history for this message
poy (poy) wrote :

Fixed in version 0.762.

Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.