[Owncloud] Bug with zeros in filenames + Hack to solve it

Maximilian Ernestus maximilian at ernestus.de
Thu Nov 3 15:17:04 UTC 2011


Hi guys,

there are some bugs when a file starts with a zero "0" and contains no 
other letters (numbers only). I don't know why. But a guy from the irc 
gave me some hints so I found this hack to solve it:
Add
if(substr($filename, 0, 1) === "0") $file['name']="/".$filename;

just after

$file['name']=$filename;

around line 50 in lib/files.php.

That puts a slash in front of the "badly" named files. It is ugly but it 
works.
Please keep me updated when you fix the bug in a nicer way.

Greetings,


Maximilian

P.S.: Thanks for the great software.



More information about the Owncloud mailing list