File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1006,11 +1006,14 @@ def move_files(
1006
1006
# We set `epub=False` for example so data doesn't get re-uploaded on each web,
1007
1007
# so we need this to protect against deleting in those cases
1008
1008
if delete_unsynced_media :
1009
+
1009
1010
if not pdf :
1011
+
1010
1012
remove_dirs ([
1011
1013
version .project .get_production_media_path (
1012
1014
type_ = 'pdf' ,
1013
1015
version_slug = version .slug ,
1016
+ include_file = False ,
1014
1017
),
1015
1018
])
1016
1019
@@ -1023,11 +1026,14 @@ def move_files(
1023
1026
if storage .exists (storage_path ):
1024
1027
log .info ('Removing %s from media storage' , storage_path )
1025
1028
storage .delete (storage_path )
1029
+
1026
1030
if not epub :
1031
+
1027
1032
remove_dirs ([
1028
1033
version .project .get_production_media_path (
1029
1034
type_ = 'epub' ,
1030
1035
version_slug = version .slug ,
1036
+ include_file = False ,
1031
1037
),
1032
1038
])
1033
1039
@@ -1042,10 +1048,12 @@ def move_files(
1042
1048
storage .delete (storage_path )
1043
1049
1044
1050
if not localmedia :
1051
+
1045
1052
remove_dirs ([
1046
1053
version .project .get_production_media_path (
1047
1054
type_ = 'htmlzip' ,
1048
1055
version_slug = version .slug ,
1056
+ include_file = False ,
1049
1057
),
1050
1058
])
1051
1059
You can’t perform that action at this time.
0 commit comments