Skip to content

Commit

Permalink
WIP fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwesta committed May 11, 2015
1 parent 07c7254 commit 1b61548
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions storage_service/locations/models/arkivum.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def move_from_storage_service(self, source_path, destination_path):
# Rsync to Arkivum watched directory
if self.remote_user and self.remote_name:
self.space._create_rsync_directory(destination_path, self.remote_user, self.remote_name)
rsync_dest = "{}@{}:{}".format(self.remote_user, self.remote_name, utils.coerce_str(destination_path))
else:
rsync_dest = destination_path
self.space._create_local_directory(destination_path)
Expand Down
2 changes: 1 addition & 1 deletion storage_service/locations/models/pipeline_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def post_move_to_storage_service(self, *args, **kwargs):
def move_from_storage_service(self, source_path, destination_path):
""" Moves self.staging_path/src_path to dest_path. """

self.space._create_rsync_directory(destination_path, self.remote_name, self.remote_name)
self.space._create_rsync_directory(destination_path, self.remote_user, self.remote_name)

# Prepend user and host to destination
destination_path = self._format_host_path(destination_path)
Expand Down
4 changes: 2 additions & 2 deletions storage_service/locations/models/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,11 @@ def _create_rsync_directory(self, destination_path, user, host):
# Assemble a set of directories to create on the remote server;
# these will be created one at a time
directories = []
path = os.path.dirname(destination_path)
path = destination_path # os.path.dirname(destination_path)
while path != '' and path != '/':
directories.insert(0, path)
path = os.path.dirname(path)

LOGGER.info('directories: %s', directories)
# Syncing an empty directory will ensure no files get transferred
temp_dir = os.path.join(tempfile.mkdtemp(), '')

Expand Down

0 comments on commit 1b61548

Please sign in to comment.