Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Fix synchronization when pictogram names have special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Jun 28, 2014
1 parent 383f979 commit 6775351
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
CHANGELOG
=========

1.29.2 (2014-06-28)
-------------------

**BUG fixes**

* Fix synchronization when pictogram names have special characters (url encoded)


1.29.1 (2014-06-26)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.29.1
1.29.2
6 changes: 4 additions & 2 deletions rando/core/management/commands/sync_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from os.path import join, getmtime, dirname, getsize
from os import makedirs, utime
import errno
import urllib2

from django.core.management.base import BaseCommand
from django.utils.http import http_date, parse_http_date_safe
Expand Down Expand Up @@ -71,10 +72,11 @@ def __init__(self, url, language=None, client=None, stdout=None, stderr=None):
self.stdout = stdout or sys.stdout
self.stderr = stderr or sys.stderr

self.path = join(settings.INPUT_DATA_ROOT, self.language, self.url)
unquoted = urllib2.unquote(self.url)
self.path = join(settings.INPUT_DATA_ROOT, self.language, unquoted)
# All files are downloaded in a separate folder.
# And copied to INPUT_DATA_ROOT if whole sync is successful.
self.path_tmp = join(settings.INPUT_TMP_ROOT, self.language, self.url)
self.path_tmp = join(settings.INPUT_TMP_ROOT, self.language, unquoted)
self.reply = None

def pull_if_modified(self):
Expand Down

0 comments on commit 6775351

Please sign in to comment.