Library folders FileSystemPath are null

Shell for WPF Forum

Posted 3 months ago by rex hui
Version: 19.1.0685
Avatar

Shouldn't the IShellObject's of ShellObjectKind.Library has the FileSystemPath filled instead of null?

I think the followings should have values for their FileSystemPath:

CameraRollLibrary,
DocumentsLibrary,
MusicLibrary,
PicturesLibrary,
SavedPicturesLibrary,
VideosLibrary

Thanks.

Comments (4)

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Rex,

We call the same shell API to retrieve the FileSystemPath for those logical "library" folders but the calls return an invalid argument HRESULT for them, so they result in null value in our API.  It seems that those libaries might not have a dedicated file system path like "Documents" (local documents) does. 

If you go to the "This PC/Documents" (which is probably the documents library) and try to edit the path in Windows Explorer, you'll see there is no real path.  I believe they mock up a fake logical path in that app.

Whereas if I enter "::{031E4825-7B94-4DC3-B131-E946B44C8DD5}\Documents" (the ParsingName) in Windows Explorer's breadcrumb path, it will go to the Documents library.


Actipro Software Support

Posted 3 months ago by rex hui
Avatar

Thanks.

I think there are ways to get even those paths:

https://www.codeproject.com/Articles/878605/Getting-All-Special-Folders-in-NET

Posted 3 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Rex,

That's odd that the core shell info objects we call don't return the path for the shell libraries.  We were able to special case these 6 libraries to do a different lookup to retrieve their paths.  This update will be in the next maintenance release.


Actipro Software Support

Posted 3 months ago by rex hui
Avatar

Great! Thank you!

The latest build of this product (v2020.1.0) was released 24 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.