maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   how does Busybox remember file/directory name case? (https://talk.maemo.org/showthread.php?t=93163)

chill 2014-05-10 03:22

how does Busybox remember file/directory name case?
 
If I try this:

touch foo
mv foo foobar
mv foobar Foo

the file I end up with is foo, not Foo. How, or, more importantly, why does Busybox seem to remember the original capitalization for foo, and why does it impose it?

pycage 2014-05-10 07:31

Re: how does Busybox remember file/directory name case?
 
Are you doing this on the MyDocs partition?
That is a Windows FAT32-formatted partition (so that it can be exported to any computer you connect the device to) and does not support case-sensitivity.

peterleinchen 2014-05-10 08:18

Re: how does Busybox remember file/directory name case?
 
@chill
Yes?
I remember such weird behaviour on Windows using Win Explorer itself.
But not on device using term/sh/busybox itself.

pichlo 2014-05-10 10:23

Re: how does Busybox remember file/directory name case?
 
Just tried it.
Code:

~ $ touch foo
~ $ ls
MyDocs          cuteTube        foo
Panorama_thumbs  distance.debug  fuelpad.db
Xorg.0.log      edicom-examples  scripts
apps            edicom.sh
~ $ mv foo bar
~ $ mv bar Foo
~ $ ls
Foo              apps            edicom.sh
MyDocs          cuteTube        fuelpad.db
Panorama_thumbs  distance.debug  scripts
Xorg.0.log      edicom-examples
~ $

However, the case is preserved as per chill's post if I try the same in MyDocs.

peterleinchen 2014-05-10 10:51

Re: how does Busybox remember file/directory name case?
 
Just tried it again. And ...
... oops. Tested it on N9. And there everything works as it should (also on MyDocs).

Will have to check on my N900 later .....

--
Yes, it is like chill said. On MyDocs on Fremantle case sensitivity acts weird.

chill 2014-05-10 21:58

Re: how does Busybox remember file/directory name case?
 
Quote:

Originally Posted by pycage (Post 1424766)
Are you doing this on the MyDocs partition?
That is a Windows FAT32-formatted partition (so that it can be exported to any computer you connect the device to) and does not support case-sensitivity.

Yeah I was doing it on my /media/mmc1, which is FAT32. But it's not that it doesn't support case sensitivity, it supports it in a weird way:

Code:

/media/mmc1 $ touch fOo
/media/mmc1 $ ls f*
fOo
/media/mmc1 $ mv fOo foobar
/media/mmc1 $ ls f*   
foobar
/media/mmc1 $ mv foobar foo
/media/mmc1 $ ls f*
fOo
/media/mmc1 $

So, as pichlo noted, it somehow "preserves" case. Why does it do that? I've not seen it elsewhere on *nix shells.

michaaa62 2014-05-10 22:09

Re: how does Busybox remember file/directory name case?
 
@Pichlo tested in /home/user represented by ~ in the terminal prompt for the location/folder. /media/mmc1 is also vfat formatted. You could evaluate the file systems with the command
Code:

mount

pichlo 2014-05-11 00:29

Re: how does Busybox remember file/directory name case?
 
I tested both in /home/user and in /home/user/MyDocs. I only published the former as the latter matched chill's experience.

I suspect some kind of caching issue. I do not believe it is busybox's fault, I assume it has more to do with the kernel and its FAT/FAT32 support. My first guess would be that the FS somehow caches the names. It might be interesting to figure out if there is a timeout or another way to reset it. I tried very briefly cd to another folder and back before the last mv but it did not make a difference. I also tried closing and reopening the terminal and that did not make a difference either, confirming my suspicion that busybox is probably innocent.


All times are GMT. The time now is 22:16.

vBulletin® Version 3.8.8