The harddrive here uses FAT 32.
petermad wrote:Try and open your %COMMANDER_PATH%\plugins\ directory and then choose to show it UNSORTED - do you see the wlx directory BEFORE the wcx directory?
Yes.
petermad wrote:With FAT the solution is to restart TC (to get all plugins out of memory) and then move all the directories in %COMMANDER_PATH%\plugins\ temporarily to another location and then move all the directories back but in another order so that the wlx directory is placed AFTER the wcx directory.
Worked like a charm!

Now we know that Mr. Ghisler's algorithm depends on the unpredictable order of creation dates of the concerning subfolders.
petermad wrote:Even though NTFS sorts the dirs, the sequence can still fool TC.
If you have a wlx file in the wcx dir, then tc will suggest the wcx dir for wlx files.
Yep.
petermad wrote:TC's searc algoritm should be expanded to look for directories with the names WLX, WCX, WFX and WDX in stead of just looking for files with those extensions - or even better - count the number of files with a certain extension and the use then directory with the highest count of the wanted file type - but that will still not be fool proof.
There is a good old programming principle called KISSS (I extended the acronym so that it has
three 'S'

):
Keep it simple, safe, and straightforward.
I often met programmers who wanted to be extra smart by ignoring this principle... and in say 95% of the cases they shot themselves into the feet!
I would use something along the lines of the following (pseudo code):
Code: Select all
function suggested_plugin_install_dir (string plugin_basedir, string plugin_type, string plugin_name)
; -- in:
; plugin_basedir: from Wincmd.ini (e.g. "%COMMANDER_PATH%\plugins")
; plugin_type : currently one of the strings "wcx", "wdx", "wfx", "wlx"
; plugin_name : name of the ZIP file of the plugin that is going to be installed
; (without the ZIP extension)
if exist_dir(plugin_basedir & "" & plugin_type) then
return plugin_basedir & "" & plugin_type & "" & plugin_name
else
return plugin_basedir & "" & plugin_name
end if
end function
Regards, Juergen