cathery / sys-ftpd

Nintendo Switch FTP server as a background service (sysmodule)
GNU General Public License v3.0
240 stars 14 forks source link

Timestamps on directories is incorrect #18

Open benwa opened 3 years ago

benwa commented 3 years ago

All timestamps on directories show an invalid timestamp. This does not affect files however. sys-ftpd-light with WinSCP image sys-ftpd-light with File Explorer image

Hekate's UMS image

FYI, this spawned from https://github.com/J-D-K/JKSV/issues/99

benwa commented 3 years ago

Here's a snippet of the WinSCP log

--------------------------------------------------------------------------
. 2021-08-20 08:41:02.336 Connecting to 10.0.0.174:5000 ...
. 2021-08-20 08:41:02.418 Connected with 10.0.0.174:5000. Waiting for welcome message...
< 2021-08-20 08:41:02.429 220 Hello!
> 2021-08-20 08:41:02.429 USER anonymous
< 2021-08-20 08:41:02.443 230 OK
> 2021-08-20 08:41:02.443 SYST
< 2021-08-20 08:41:02.454 215 UNIX Type: L8
> 2021-08-20 08:41:02.454 FEAT
< 2021-08-20 08:41:02.465 211-
< 2021-08-20 08:41:02.465  MDTM
< 2021-08-20 08:41:02.465  MLST Type*;Size*;Modify*;Perm*;UNIX.mode;
< 2021-08-20 08:41:02.465  PASV
< 2021-08-20 08:41:02.465  SIZE
< 2021-08-20 08:41:02.465  TVFS
< 2021-08-20 08:41:02.465  UTF8
< 2021-08-20 08:41:02.465 211 End
> 2021-08-20 08:41:02.465 OPTS UTF8 ON
< 2021-08-20 08:41:02.476 200 OK
. 2021-08-20 08:41:02.497 Connected
. 2021-08-20 08:41:02.497 --------------------------------------------------------------------------
. 2021-08-20 08:41:02.497 Using FTP protocol.
. 2021-08-20 08:41:02.498 Doing startup conversation with host.
> 2021-08-20 08:41:02.511 PWD
< 2021-08-20 08:41:02.519 257 "/"
. 2021-08-20 08:41:02.520 Changing directory to "/".
> 2021-08-20 08:41:02.520 CWD /
< 2021-08-20 08:41:02.531 200 OK
. 2021-08-20 08:41:02.531 Getting current directory name.
> 2021-08-20 08:41:02.531 PWD
< 2021-08-20 08:41:02.542 257 "/"
. 2021-08-20 08:41:02.582 Retrieving directory listing...
> 2021-08-20 08:41:02.582 TYPE A
< 2021-08-20 08:41:02.594 200 OK
> 2021-08-20 08:41:02.595 PASV
< 2021-08-20 08:41:02.606 227 Entering Passive Mode (10,0,0,174,90,16)
> 2021-08-20 08:41:02.606 MLSD
. 2021-08-20 08:41:02.606 Connecting to 10.0.0.174:23056 ...
< 2021-08-20 08:41:02.628 150 Ready
. 2021-08-20 08:41:02.638 Type=cdir;Size=0;Modify=19700101000000;Perm=cdeflmp; /
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; System Volume Information
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; JKSV
. 2021-08-20 08:41:02.652 Type=file;Size=110013;Modify=20210819214522;Perm=adfrw; Lockpick_RCM.bin
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; Nintendo
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; atmosphere
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; bootloader
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; config
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; sept
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; switch
. 2021-08-20 08:41:02.652 Type=file;Size=1501171;Modify=20201219182022;Perm=adfrw; hbmenu.nro
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; backup
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; emuiibo
. 2021-08-20 08:41:02.652 Type=file;Size=1924;Modify=20201207145714;Perm=adfrw; exosphere.ini
. 2021-08-20 08:41:02.652 Type=dir;Size=0;Modify=19700101000000;Perm=cdeflmp; Video
. 2021-08-20 08:41:02.684 Data connection closed
< 2021-08-20 08:41:02.684 226 OK
impeeza commented 3 years ago

I think is a issue of the FAT driver, mine have the wrong dates even reading the SD directly with a card reader.