Skip to content

Instantly share code, notes, and snippets.

@mcantelon
Created July 16, 2012 17:48
Show Gist options
  • Save mcantelon/3123991 to your computer and use it in GitHub Desktop.
Save mcantelon/3123991 to your computer and use it in GitHub Desktop.
JavaScript for copy is:
media/js/transfer/component_form.js (line 46)
Server-side code is:
main/filesystem.py (line 105)
Code that does actual copying:
if os.path.isdir(entry_path):
destination_dir = os.path.join(transfer_dir, entry)
try:
shutil.copytree(
entry_path,
destination_dir
)
except:
error = 'Error copying from ' + entry_path + ' to ' + destination_dir + '.'
else:
shutil.copy(entry_path, transfer_dir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment