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

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

  • 103 Replies
  • 47500 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #90 on: 13 / November / 2015, 20:28:32 »
Advertisements
G12.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 14118
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #91 on: 13 / November / 2015, 21:09:18 »
Thanks waterwingz and philmoz. Can you also run the script from
http://chdk.setepontos.com/index.php?topic=10833.msg125194#msg125194

It will probably crash, you either adjust the limits described in that post are upload the partial log.

edit:
I noticed Phils log has a bunch of the filenames prefixed with ._ I guess this is a Mac-ism from something in the unzip or copy. It shouldn't hurt anything.
« Last Edit: 13 / November / 2015, 21:15:38 by reyalp »
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #92 on: 13 / November / 2015, 22:22:04 »
Thanks waterwingz and philmoz. Can you also run the script from
http://chdk.setepontos.com/index.php?topic=10833.msg125194#msg125194

It will probably crash, you either adjust the limits described in that post are upload the partial log.

edit:
I noticed Phils log has a bunch of the filenames prefixed with ._ I guess this is a Mac-ism from something in the unzip or copy. It shouldn't hurt anything.

G12 log. Crashes unless path len <= 59 and filename len <= 98

Yes, the ._* files are from OS X.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Long filenames - a file browser modification for Select Script File menu
« Reply #93 on: 13 / November / 2015, 22:31:40 »
ixus120_sd940  log.   Crashes as well - do you need me to iterate back to figure out where ?
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline srsa_4c

  • ******
  • 4451
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #94 on: 14 / November / 2015, 08:51:07 »
ixus120_sd940  log.   Crashes as well
Guess you could try starting with limits reported by philmoz above.

Re: Long filenames - a file browser modification for Select Script File menu
« Reply #95 on: 14 / November / 2015, 09:27:47 »
ixus120_sd940  log.   Crashes as well
Guess you could try starting with limits reported by philmoz above.

Anything beyond line 454 :
Code: [Select]
'A/LFN_TEST/1234567.D', -- total 33 with 8.3 filecrashes.   

But the next jump is all the way to
Code: [Select]
- total 60 with 8.3, dryos r31 seems to fail at 60
'A/LFN_TEST/1234567.D/1234567.D/1234567.D/123456',
so I'd need to play trial and error to figure out where it breaks after name 256 path 21  but before  name 11 path 48.  Time consuming to do so I'd only go there if knowing the result has some value?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14118
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #96 on: 14 / November / 2015, 16:47:22 »
G12 log. Crashes unless path len <= 59 and filename len <= 98
Thanks. Looks like R45 is similar to R47.

I noticed an oddity in this log, that directory listing seems to fail in some cases where open/write/close/stat all work. This happens with both the canon firmware readdir and the custom one:

31 char filename in root is OK
Code: [Select]
TEST START
check: dir=A pfx=T08 ext=.TXT len=31
long:  A/T08AAAAAAAAAAAAAAAAAAAAAAAA.TXT
short: A/T08AAA~1.TXT
PASS open A/T08AAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS stat A/T08AAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS stat A/T08AAA~1.TXT
PASS idir CHDK_LFN A/ found long
PASS idir CANON_FW A/ found long
PASS read A/T08AAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS read A/T08AAA~1.TXT
PASS os.remove long
PASS remove long
TEST PASSED
32 char is not:
Code: [Select]
TEST START
check: dir=A pfx=T09 ext=.TXT len=32
long:  A/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
short: A/T09AAA~1.TXT
PASS open A/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS stat A/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS stat A/T09AAA~1.TXT
FAIL idir CHDK_LFN A/ not found
FAIL idir CANON_FW A/ not found
PASS read A/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS read A/T09AAA~1.TXT
PASS os.remove long
PASS remove long
TEST FAILED failures:2 errors:0

On the other hand, 32  works in a subdirectory  :blink:
Code: [Select]
TEST START
check: dir=A/LFN_TEST pfx=T09 ext=.TXT len=32
long:  A/LFN_TEST/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
short: A/LFN_TEST/T09AAA~1.TXT
PASS open A/LFN_TEST/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS stat A/LFN_TEST/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS stat A/LFN_TEST/T09AAA~1.TXT
PASS idir CHDK_LFN A/LFN_TEST found long
PASS idir CANON_FW A/LFN_TEST found short
PASS read A/LFN_TEST/T09AAAAAAAAAAAAAAAAAAAAAAAAA.TXT
PASS read A/LFN_TEST/T09AAA~1.TXT
PASS os.remove long
PASS remove long
TEST PASSED

The 'idir' tests list the directory contents and look for both the long and short versions of the name it just created, using both the CHDK lfn code and the stock firmware code. Since stat and the following read work, we know the file was created.

msl's r47 log does not show this.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14118
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #97 on: 14 / November / 2015, 16:57:07 »
Anything beyond line 454 :
Code: [Select]
'A/LFN_TEST/1234567.D', -- total 33 with 8.3 filecrashes.   
IIRC, R39 was where we ran into the very short total path limit somewhere around 32 chars.

Looking at the log, total length over 32 fails, even though it doesn't crash. So I think we can say the path limit for this cam is 32. Like the others, it is able to list and read much longer paths if they exist on the card, but it barfs on on a deep directory like A/TESTFN/12345678/12345678/12345678/12345678/12



Don't forget what the H stands for.


Re: Long filenames - a file browser modification for Select Script File menu
« Reply #98 on: 14 / November / 2015, 18:34:13 »
IIRC, R39 was where we ran into the very short total path limit somewhere around 32 chars.
Yes.  If it wasn't me that tripped over it first,  I was one of the people who first struggled with it.

Quote
Looking at the log, total length over 32 fails, even though it doesn't crash. So I think we can say the path limit for this cam is 32. Like the others, it is able to list and read much longer paths if they exist on the card, but it barfs on on a deep directory like A/TESTFN/12345678/12345678/12345678/12345678/12
Not sure if it matters, but the presence of a really long filename in the root folder causes a chdkptp  "ls" command to barf and error out.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 4451
Re: Long filenames - a file browser modification for Select Script File menu
« Reply #99 on: 14 / November / 2015, 20:09:21 »
I noticed an oddity in this log, that directory listing seems to fail in some cases where open/write/close/stat all work. This happens with both the canon firmware readdir and the custom one:

31 char filename in root is OK
(...)
32 char is not:
(...)
On the other hand, 32  works in a subdirectory
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.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal