Created
December 3, 2013 21:10
-
-
Save portante/7777518 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py | |
| index 288d8a5..326faee 100644 | |
| --- a/swift/obj/diskfile.py | |
| +++ b/swift/obj/diskfile.py | |
| @@ -454,7 +454,8 @@ class DiskFileManager(object): | |
| dev_path = self.get_dev_path(device) | |
| if not dev_path: | |
| raise DiskFileDeviceUnavailable() | |
| - return DiskFile(self, dev_path, self.threadpools[device], | |
| + return DiskFile(self, join(dev_path, DATADIR), | |
| + self.threadpools[device], | |
| partition, account, container, obj, **kwargs) | |
| def object_audit_location_generator(self): | |
| @@ -899,8 +900,7 @@ class DiskFile(object): | |
| self._container = container | |
| self._obj = obj | |
| name_hash = hash_path(account, container, obj) | |
| - self._datadir = join( | |
| - device_path, storage_directory(DATADIR, partition, name_hash)) | |
| + self._datadir = storage_directory(device_path, partition, name_hash)) | |
| else: | |
| # gets populated when we read the metadata | |
| self._name = None | |
| @@ -918,8 +918,7 @@ class DiskFile(object): | |
| self._datadir = _datadir | |
| else: | |
| name_hash = hash_path(account, container, obj) | |
| - self._datadir = join( | |
| - device_path, storage_directory(DATADIR, partition, name_hash)) | |
| + self._datadir = storage_directory(device_path, partition, name_hash)) | |
| @property | |
| def account(self): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment