oh, you're right, sorry...
i've changed the function to the following to get it working:

function readFavsFile()
  local p1 = props["SciteDefaultHome"]
  if props["PLAT_GTK"] ~= '' then
    file1 = p1.."/.SciTE.favs"
  else
    file1 = p1.."\\SciTE.favs"
  end
  local f1 = io.open(file1)
  local favs = {}
  local i = 1
  if f1 then
    for line in f1:lines() do
      local l=line
      for c in string.gfind(l, "%$%(([^\)]*)%)") do
        l=string.gsub(l,"%$%(([^\)]*)%)",props[c])
      end
      --_ALERT(l)
      fh=io.open(l)
      if fh then
        favs[i] = l
        i = i + 1
        io.close(fh)
      end
    end
    io.close(f1)
  end
  return favs
end

i have build in a function to replace vars (in my case $(SciteDefaultHome)) 
with their value. This value is "D:\Programmierung\wscite" but will be replaced 
by the old short value "D:\PROGRA~1\wscite". is there a way to get the long 
format?

Regards Frank

-------- Original-Nachricht --------
Datum: Mon, 5 Feb 2007 18:33:45 +1100
Von: "Neil Hodgson" <[EMAIL PROTECTED]>
An: "Discussion of the SciTE editor" <[email protected]>
CC: 
Betreff: Re: [scite] strange problem (LUA: favorites - backup)

>    In readFavsFile() you call io.open for every file in the favs file
> to see if they exist but don't call close.

-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: 
http://www.gmx.net/de/go/promail?ac=OM.GX.GX003K11711T4781a
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to