
I solved the problem. Somehow, my variable def_as_directory got corrupted and was set to %SLICKEDITCONFIG%/autosave. SlickEdit was trying to create this directory under Program Files and, of course, failing!
I recommend the following change to autosave.e:
===
static _str _as_directory()
{
if (def_as_directory=='') {
/* Following line is the change */
def_as_directory = _ConfigPath():+'autosave':+FILESEP;
}
return(def_as_directory);
}
===
This will set def_as_directory to the correct value, if not set yet (may have been done elsewhere, I don't know...)
And adding the following block to fileman.e:
===
int make_path(_str path, typeless doShellMessages='')
{
//Second argument is not documented and is intended for fileman mode.
boolean shell_messages= doShellMessages!='';
if ( last_char(path)==FILESEP ) {
/* Remove ending FILESEP */
path=substr(path,1,length(path)-1);
}
typeless status=0;
_str prevpath=substr(path,1,pathlen(path)-1);
/* Change starts */
if(prevpath==path) {
_message_box(nls("Infinite recursion detected making path '%s'", path));
return ERROR_CREATING_DIRECTORY_RC;
}
/* Change ends */
if ( length(prevpath)>2 ) {
/* if previous directory doesn't exist make it first */
/* else return */
if ( ! isdirectory(prevpath) ) {
status= make_path(prevpath,shell_messages);
if ( status ) { return(status); }
}
}
/* make this directory */
if ( shell_messages ) {
if ( _iswindow_valid(_shell_wid)) {
_shell_wid.list1.insert_line('mkdir 'path);
_shell_wid.list1.refresh();
}
}
status=mkdir(path);
return(status);
}
===
If something goes horribly wrong (like it did for me...) and SlickEdit gets stuck, it will kinda gracefully recover.
Hope this is completely useless to everyone, because if it is useful to you, you are probably extremely annoyed! :-)