if not d2 then
return nil, err
else
- print('follow')
return checkdir(d2)
end
elseif t=="directory" then
return true
else
- return TR("Not a directory.")
+ return nil, TR("Not a directory.")
end
end
end
--DOC
-- Change default working directory for new programs started in \var{reg}.
function ioncore.chdir_for(reg, dir)
- assert(type(dir)=="string")
+ assert(dir==nil or type(dir)=="string")
if dir=="" or dir==nil then
dirs[reg]=nil
return true
local function lookup_runinxterm_warn(prog, title, wait)
local rx=lookup_script_warn("ion-runinxterm")
if rx then
+ rx="exec "..rx
if wait then
rx=rx.." -w"
end
local function save_config()
local t={}
for r, d in pairs(dirs) do
- t[r:name()]=d
+ local nm=obj_exists(r) and r:name()
+ if nm then
+ t[nm]=d
+ end
end
ioncore.write_savefile(savefile, t)
end