Long filenames - a file browser modification for Select Script File menu - page 11 - General Discussion and Assistance - CHDK Forum

Long filenames - a file browser modification for Select Script File menu

  • 103 Replies
  • 48301 Views
*

Offline reyalp

  • ******
  • 14125
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #100 on: 14 / November / 2015, 22:27:41 »
Advertisements
I have noticed (and mentioned) that open()ing the root directory fails on some cards - in this case the fw opendir routine will be used as fallback. I have no idea why it fails. For me, it seems to happen on small (FAT12 or 16?) cards.
Thanks, I missed or forgot that. That could explain why they behave the same, still not sure why the neither long nor short would be listed when open and stat work  :-[

Summarizing the known limits so far:

VxWorks (A540 FAT16) informational only, no CHDK LFN support
filename 18 total 255 (>255 crashes)

DryOS r20
?

DryOS r23 (sx100 FAT16,ixus80)
filename 18, total 255

DryOS r31 (D10 FAT16)
filename 18 total 59 (>59 crashes)

DryOS r39 (ixus120)
filename 30 total 32

DryOS r43
?

DryOS r45 (g12)
filename >33, total 59

DryOS r47 (a3200, ixus115)
filename 31, total 59
sx220 is also r47 and behaves differently?
filename >33, total 59

DryOS >= r49 (sx160 (r49) a3400 (r50), elph130 (r51) sx280 (r52), ixus150 (r54) )
filename 255 total unknown but > 500
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #101 on: 14 / November / 2015, 23:28:50 »
I checked in code to define the known limits in trunk r4289.

You can test this by running lfntest2.lua. The short names should be listed whenever the limits are exceeded, although the resulting path may still be longer than the limits.

For the unknown dryos versions, I used the same limits as >r49.

For cameras where no specific filename limit was determined, I made it 2 less than the total path limit, to account for the A/.

I assumed the sx230hs was the same as sx220hs. I'm not really sure if the difference between r47 cams is a real firmware difference, a testing error, or card / filesystem specific?

lftest.lua should still work to check limits, because the defines only affect what listdir returns, while the errors and crashes happen on create etc.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #102 on: 14 / April / 2020, 18:23:20 »
I finally noticed that DryOS r43 cameras still did not have correct limits defined. Tests done on my a490 revealed the same limits that were found on r39 cams. Added in r5461 for trunk and r5462 for CHDK 1.4.

*

Offline Caefix

  • *****
  • 948
  • Sorry, busy deleting test shots...
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #103 on: 09 / September / 2020, 12:37:57 »
 :-[ "A/mf_ixus960_sd950.csv" seems too long for cam to open, but browser displays LFNs.
Quote
function new_log(cam)
    filename = "A/mf_"..cam..".csv"
    log=io.open(filename,"a")
   if not log then
      filename = "A/mftest.csv"
      log=io.open(filename,"a")
   end
    log:write( cam,", ", os.date(),",MF Test 3.1.0 Log\n")     
    log:close()
end
Edit:  :haha FW-limits...https://chdk.setepontos.com/index.php?topic=10833.msg125241#msg125241
Quote
RESULTS
path:   9 pass:  18 (  27) fail:-
path:  20 pass:  18 (  38) fail:-
path:  48 pass:  18 (  66) fail:-
listdir name max=18 pass=18
listdir path max=66 pass=66
Anything left to do here?   :) ...
https://chdk.setepontos.com/index.php?topic=10833.msg125394#msg125394
Ix105 same as Sx210.
« Last Edit: 11 / September / 2020, 11:48:42 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal