zmjdx / swiftp

Automatically exported from code.google.com/p/swiftp
GNU General Public License v3.0
0 stars 0 forks source link

Filenames are wrong (timestamp added) #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Start swiftp
2.Mount the ftp drive on windows explorer
3.Watch filenames. I've got names like "23:57 media" or "23:53 data"

What is the expected behavior? What do you see instead?
The expected behavior is to find names like "data" instead of "23:53 data". 
Folders and files are inaccessible this way (unless I enter their correct 
name manually into address bar).

What version of the product are you using?
1.11

What operating system are you using?
Windows 7

What FTP client are you using?
Windows Explorer

Which Android device do you have (Droid, Hero, G1, etc.)?
HTC Dream

What do the server log and session monitor say around the time that the
error occurs?
Don't know where to look

May we contact you by email to ask questions? If so, what is your email
address?

Please provide any additional information below.

Original issue reported on code.google.com by cerebr...@gmail.com on 2 Jan 2010 at 2:44

GoogleCodeExporter commented 8 years ago
Same thing here, the only solution is to put your files in the /sd/ directory ;)

Original comment by lyx1...@gmail.com on 3 Jan 2010 at 5:02

GoogleCodeExporter commented 8 years ago
I think was a UTF-8 encoding issue (fixed in 1.13). Will reopen this issue if 
anyone
has a problem again.

Original comment by Dave.Revell@gmail.com on 13 Jan 2010 at 3:30

GoogleCodeExporter commented 8 years ago
I've got 1.21, not working as before.

Original comment by cerebr...@gmail.com on 13 Jan 2010 at 4:53

GoogleCodeExporter commented 8 years ago
It works for me, using Windows 7 and Windows Explorer.

For anyone that has this bug:
1: Are you using the factory-installed Android version, or a custom ROM?
2: What country/locale/language do you use (for Android and Windows)?
3: What Android version do you have?
4: Does the problem occur in every directory?
5: What is the year/month/day timestamp of one of the files that displays 
incorrectly?

Thanks,
Dave

Original comment by Dave.Revell@gmail.com on 13 Jan 2010 at 6:14

GoogleCodeExporter commented 8 years ago
1: Are you using the factory-installed Android version, or a custom ROM?
Used WG-Build Y until today, now I'm using latest cyanogen. Not working either 
way.

2: What country/locale/language do you use (for Android and Windows)?
Android and Windows 7 Professional are both in italian.

3: What Android version do you have?
Base is 1.6, there are some bits of eclair.

4: Does the problem occur in every directory?
Yes. In root directory, there's a strage behaviour: the problem occurs for 
every 
directory and files expect two, file "serial.txt" and directory "tastiera".

5: What is the year/month/day timestamp of one of the files that displays 
incorrectly?
01/01/1980 13:00

Original comment by cerebr...@gmail.com on 13 Jan 2010 at 6:31

GoogleCodeExporter commented 8 years ago
Would you be willing to try this version? It has an attempted fix for this 
issue.

http://swiftp.googlecode.com/files/SwiFTP_1.22cerebro84.apk

Original comment by Dave.Revell@gmail.com on 13 Jan 2010 at 9:27

GoogleCodeExporter commented 8 years ago
Still the same, but I watched logcat and commands output looks fine. Don't know 
if that 
can be useful, but I posted it to pastebin.

http://pastebin.com/m5cab3575

Original comment by cerebr...@gmail.com on 13 Jan 2010 at 11:21

GoogleCodeExporter commented 8 years ago
If you wouldn't mind another round of testing, I've posted another attempted 
fix at:

http://swiftp.googlecode.com/files/SwiFTP_1.22cerebro84.apk

I think the problem is the parsing of directory listing timestamps by Windows
Explorer. For some reason, I can't seem to reproduce this, but the fix should be
straightforward enough. This version uses a simplified /bin/ls format.

Original comment by Dave.Revell@gmail.com on 17 Jan 2010 at 7:53

GoogleCodeExporter commented 8 years ago
Not working, but this time is different. Before, i had time and filename (like 
23:57
media, to follow first post example) now I have 08 2010 media, that is dd yyyy 
filename.
So I think you're on the right way. If you're parsing ls output, why not just 
use ls -1 ?

Original comment by cerebr...@gmail.com on 17 Jan 2010 at 9:41

GoogleCodeExporter commented 8 years ago
Despite a couple more hours I'm still baffled. I've uploaded a version which 
will log
the exact buffer that's being sent to the FTP client. If you'd be willing to 
run this
new version and post the logcat output to pastebin again, I'd be very grateful. 
If
you do a grep for "cerebro84" in the logcat output you'll see what I'm looking 
for.

http://swiftp.googlecode.com/files/SwiFTP_1.22cerebro84.apk

Thanks,
D

Original comment by Dave.Revell@gmail.com on 17 Jan 2010 at 11:06

GoogleCodeExporter commented 8 years ago
http://pastebin.com/ma65bcfd

Original comment by cerebr...@gmail.com on 18 Jan 2010 at 1:35

GoogleCodeExporter commented 8 years ago
I may have had an intuition watching the log. The only files displaying 
correctly are 
the ones of November, because in italian November is "Nov" like in english. All 
the 
other ones - Gen (that is January) Dic (december) and so on cannot be parsed 
correctly 
be the ftp client, that expects them to be in english?

Original comment by cerebr...@gmail.com on 19 Jan 2010 at 1:16

GoogleCodeExporter commented 8 years ago
I was right, that worked for me. Changing lines 149 and 152 in CmdLIST.java to:

            format = new SimpleDateFormat(" MMM dd HH:mm ", Locale.US);
            format = new SimpleDateFormat(" MMM dd  yyyy ", Locale.US);

makes it.

You couldn't reproduce it because your locale was fine.

Original comment by cerebr...@gmail.com on 19 Jan 2010 at 1:32

GoogleCodeExporter commented 8 years ago
Nicely done. Thanks for all your help on this one.

Root cause: my English-centric mindset. How embarrassing.

Closing this bug, fixed in 1.22.

Original comment by Dave.Revell@gmail.com on 19 Jan 2010 at 5:51