]> git.parisson.com Git - telemeta.git/commitdiff
fix path
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 22 Jan 2014 13:24:54 +0000 (14:24 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 22 Jan 2014 13:24:54 +0000 (14:24 +0100)
telemeta/management/commands/telemeta-import-items-without-copy.py

index f95a91fe442aac874b46b7a336bf758fb0ae6d94..5b356ceb0321591ecb1e9e59f68814924b0614e5 100644 (file)
@@ -15,7 +15,7 @@ class Command(BaseCommand):
         collection_code = args[-2]
         media_dir = args[-1]
 
-        if not media_dir in settings.MEDIA_ROOT:
+        if not settings.MEDIA_ROOT in os.path.abspath(media_dir):
             sys.exit('This directory is not in the MEDIA_ROOT directory')
 
         collections = MediaCollection.objects.filter(code=collection_code)