Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to drop incorrect file name? #59

Open
spumer opened this issue Aug 17, 2017 · 3 comments
Open

How to drop incorrect file name? #59

spumer opened this issue Aug 17, 2017 · 3 comments

Comments

@spumer
Copy link

spumer commented Aug 17, 2017

Hi. I try to repair filesystem on my SD card.
I have a .JPG file which recognized as directory with infinity content.

Full paht is: /DCIM/170_1308/i├R6&4v.JPG

Auto-rename don't performed and i can't choose "drop it".
When i start dosfsck with -d option i got an error:

Invalid character in name. Use \ooo for special characters.

But this character have too long code in octal form - 22434, when program expect only 3 nums

I read name by python and translate symbol:

int chr octal
9500 ├ 0o22434
@fstirlitz
Copy link
Contributor

Use \303. Short file names are not stored as Unicode characters, but as bytestrings in the 'OEM code page', which is locale-dependent (long file names are stored as UCS-2 strings). By default, dosfsck will assume it to be code page 437 (you can change it with the -c option) and will convert short names into your (POSIX) locale's encoding so that it displays correctly in the terminal.

Though surely there has to be more convenient way to deal with this...

@spumer
Copy link
Author

spumer commented Aug 20, 2017

@fstirlitz thanks!
I tried to delete broken directory by cmd:
dosfsck -a -d "/DCIM/170_1308/i\\303R6&4v.JPG" card.image

But dosfsck still try to rename infinity content of this:

/DCIM/170_1308/i}├R6&4v.JPG/L2²E0"n.I¿╩
  Bad short file name (L2²E0"n.I¿╩).
  Auto-renaming it.
  Renamed to FSCK0000.346

@spumer
Copy link
Author

spumer commented Aug 25, 2017

@fstirlitz any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants