mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: Ensure uploads directory exists.
This commit is contained in:
parent
0a942dbc73
commit
b860d1b254
1 changed files with 8 additions and 4 deletions
|
@ -230,10 +230,14 @@ module BackupRestore
|
|||
|
||||
log "Archiving uploads..."
|
||||
FileUtils.cd(File.join(Rails.root, "public")) do
|
||||
execute_command(
|
||||
"tar --append --dereference --file #{tar_filename} #{upload_directory}",
|
||||
"Failed to archive uploads."
|
||||
)
|
||||
if File.directory?(upload_directory)
|
||||
execute_command(
|
||||
"tar --append --dereference --file #{tar_filename} #{upload_directory}",
|
||||
"Failed to archive uploads."
|
||||
)
|
||||
else
|
||||
log "No uploads found, skipping archiving uploads..."
|
||||
end
|
||||
end
|
||||
|
||||
remove_tmp_directory
|
||||
|
|
Loading…
Reference in a new issue