preliminary lua iolib and oslib port - page 4 - General Discussion and Assistance - CHDK Forum  

preliminary lua iolib and oslib port

  • 36 Replies
  • 17359 Views
*

Offline reyalp

  • ******
  • 12796
Re: preliminary lua iolib and oslib port
« Reply #30 on: 10 / November / 2008, 22:56:34 »
Advertisements
@msl
showall is an undefined variable (== nil == non-true). Try passing true instead.

@FE50
It appears the return status for a file is success. I'll see if I can work around that.
Don't forget what the H stands for.

*

Offline fe50

  • ******
  • 3119
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: preliminary lua iolib and oslib port
« Reply #31 on: 11 / November / 2008, 03:24:06 »
@reyalP
What do you mean with "..showall is a placeholder for a boolean value. If it is true, t includes ".", ".." and deleted entries" ?
With TRUE i can see the . and .. entries, but no deleted ones, neither folders nor files (DryOS & VxWorks) - is there a special magic ?

*

Offline msl

  • *****
  • 1271
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: preliminary lua iolib and oslib port
« Reply #32 on: 11 / November / 2008, 06:54:51 »
Thx for reply.

Yes, that was my fault. With a little correction my script above shows the right result.

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 12796
Re: preliminary lua iolib and oslib port
« Reply #33 on: 11 / November / 2008, 15:57:10 »
Don't forget what the H stands for.


*

Offline fe50

  • ******
  • 3119
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: preliminary lua iolib and oslib port
« Reply #34 on: 11 / November / 2008, 18:19:33 »
Well, i know the del mechanism & the FAT internals well (had lots of fun with it under dos years ago, TASM & MASM era...), but what i wanted to say with my post: even when there are deleted files on the card / in the folder, listdir don't show them on my cams, neither with msl's script nor with own test scripts !

The test scenario, done with my SD400 (VxWorks) on a 32 MB card, card reader, Win XP SP3 & windows explorer):
- added
    tlistdir(tdir0,true)
    tlistdir("A/FE50TST",true)
-- NOTE invalid operations frequently leave the filesystem in a corrupt state

in your original llibtst.lua,

- created a folder FE50TST, copied some files there, then deleted them except for 2 files...

-> the result: in the log file i don't get the deleted files:
Code: [Select]
os.listdir("A/FE50TST",true): OK PASS
{
 1="."
 2=".."
 3="DISKBOOT.BIN"
 4="VERS.REQ"
}

I also deleted a file with the file browser, no changes...

*

Offline reyalp

  • ******
  • 12796
Re: preliminary lua iolib and oslib port
« Reply #35 on: 11 / November / 2008, 19:14:38 »
I can only assume that readdir behaves differently on different cameras for some reason. Either CHDK isn't actually using the same functions, or the Canon firmware is doing something different.

Note that the file browser also contains code for ignoring the 0xE5 entries, so at least some cameras have been known to return this for a while.
Don't forget what the H stands for.

Re: preliminary lua iolib and oslib port
« Reply #36 on: 03 / December / 2008, 04:19:39 »
Tested the TX1.

All passed. Updated LUA wiki page to add TX1 to list of tested cameras.

 

Related Topics