Self-Evident / OneFileCMS

A single file cms - all in one file!
http://onefilecms.com/
165 stars 57 forks source link

Files are not visible #43

Open mikoday opened 8 years ago

mikoday commented 8 years ago

Files on my server are not listed with OneFileCMS. Chrome console shows error after file2.txt: Uncaught SyntaxError: Invalid or unexpected token

DIRECTORY_DATA[0] = new Array( "txt","func.js", 3910, 1435239061, 0,"js"); DIRECTORY_DATA[1] = new Array( "php","test.php", 185432, 1446826211, 0,"php"); DIRECTORY_DATA[2] = new Array( "php","info.php", 520, 1446831087, 0,"php"); DIRECTORY_DATA[3] = new Array( "txt","ver.txt", 959, 1450181658, 0,"txt"); DIRECTORY_DATA[4] = new Array( "bin","file2.txt ", 98, 1446826902, 0,"txt ");

Self-Evident commented 8 years ago

Thanks for the notice. I have a fix for a files not showing issue and will post it soon . The error after file2.txt seems to be a newline or something in the file name, and may be another issue. After the next update (to v3.5.20) (and probably tomorrow), let me know if the error persists.

mikoday commented 8 years ago

Hi, thank you for the quick update, but the issue still persists. I think there is some non-standard character in the filename.

Self-Evident commented 8 years ago

Hmmm... Well so much for the easy fix...

Does OneFileCMS work at all on your website? And if it hasn't been tried, can you use an FTP program to delete or rename "file2.txt" and see if that helps?

mikoday commented 8 years ago

Hello, yes it works, but in some directories there are filenames with untypical characters. If I rename this file everything works. :)

Self-Evident commented 8 years ago

Thanks for the info - that's something I don't think I would have thought of. After a bit of research, I've learned that some file systems actually permit not-printable control characters in file names. Seems like not a good idea to me, but c'est-la-vie. Anway, at least now I know to check for that, and will add that to the to-do list.

Hmmm, just to be sure I understand what you mean by "untypical" characters - do you mean simply non-printable control type characters? Or, are there some "normal" printable characters (non-ASCII, but still valid characters for some other language*) that also cause problems? I'm not asking you to spend time checking, I just want to clarify your current observation. Thanks!

*PS: Any UTF-8 encoded Unicode character "should" be ok... I think...