Closed AbleOpus closed 6 years ago
What is invalid about this bug? This program is completely incapable of correctly identifying user directories. It does not even check to see if they exist. Use SHGetFolderPath with CSIDL_MYVIDEO instead of guessing.
I still can't understand what's your problem.
I'm not sure I can spell this out any further but I will attempt to do so. The program, at first execution, provides a list of preset directories of personal folders. These directories are a "best guess". Tech savvy people almost always have their OS on an SSD and their personal files on their storage drive (the personal folders have been changed from their default). Your program does not account for this and just assumes these personal directories are in their default location. SHGetFolderPath ensures that the correct folders are retrieved. So the users downloads directory will be correctly retrieved no matter where it is. SHGetFolder can be used to correctly find the Downloads, Music, and Video folder. The other folders (such as "desktop") can be guessed I guess but it's probably best to retrieve them with pinvoke.
Open up a command prompt (WinKey + R, type cmd, hit Enter).
Now execute the following commands:
echo %HOME%
echo %USERPROFILE%
echo %HOMEPATH%
echo %HOMEDRIVE%
Paste the output of each command here.
%HOME% = %HOME% %USERPROFILE% = C:\Users\Brian %HOMEPATH% = \Users\Brian %HOMEDRIVE%= C:
Bug report
I do not have media folders at C:\User\Brian. Consider adding the actual video and music media folders used by the user. It is common for these folders to be customized since many people run their OS on an SSD and keeping their personal files on a storage drive.