Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with files containing unusual characters #19

Open
GoogleCodeExporter opened this issue May 18, 2015 · 3 comments
Open

Problem with files containing unusual characters #19

GoogleCodeExporter opened this issue May 18, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 25 Aug 2011 at 12:41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant