should use public_store.file_exists to check if the file copied correctly
authorRodney Ewing <ewing.rj@gmail.com>
Mon, 2 Sep 2013 19:09:55 +0000 (12:09 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Mon, 2 Sep 2013 19:09:55 +0000 (12:09 -0700)
mediagoblin/processing/__init__.py

index 361a9736e65e025971538f9367d56160d90f6eaa..bdbe0441bda352970bb748d180801fd68c9be8cc 100644 (file)
@@ -376,8 +376,7 @@ def store_public(entry, keyname, local_file, target_name=None,
         raise PublicStoreFail(keyname=keyname)
 
     # raise an error if the file failed to copy
-    copied_filepath = mgg.public_store.get_local_path(target_filepath)
-    if not os.path.exists(copied_filepath):
+    if not mgg.public_store.file_exists(target_filepath):
         raise PublicStoreFail(keyname=keyname)
 
     entry.media_files[keyname] = target_filepath