Vishnupriyan-Inba / phpsvnclient

Automatically exported from code.google.com/p/phpsvnclient
0 stars 0 forks source link

Problem with files containing unusual characters #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I was downloading a file with symbols '[' and ']' in its name. It was 
mistakenly reported as a directory, because the 'type' field had these symbols 
replaced by %XX by the SVN server, but the 'path' field did not. I suggest 
replacing the line

$this->storeDirectoryFiles['path'] = str_replace(' ', '%20', 
$this->storeDirectoryFiles['path']); //Hack to make filenames with spaces work.

with these lines

$original = array('%','$','&',',',':',';','=','?','@',' 
','<','>','#','{','}','|','^','~','[',']','`');         
$replacements = 
array('%25','%24','%26','%2c','%3a','%3b','%3d','%3f','%40','%20','%3c','%3e','%
23','%7b','%7d',
$this->storeDirectoryFiles['path'] = str_replace($original, $replacements, 
$this->storeDirectoryFiles['path']); 

Original issue reported on code.google.com by Brasa...@gmail.com on 25 Aug 2011 at 12:41

GoogleCodeExporter commented 8 years ago
Hm, part of the $replacements line was cut off, but I think you get the idea...

Original comment by Brasa...@gmail.com on 25 Aug 2011 at 12:42

GoogleCodeExporter commented 8 years ago

Original comment by forpdfse...@gmail.com on 21 Sep 2011 at 5:47

GoogleCodeExporter commented 8 years ago

Original comment by forpdfse...@gmail.com on 21 Sep 2011 at 5:48