From d712461cfa535dff905d1951c1dd3d710afaad92 Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Thu, 17 Sep 2009 10:54:01 +0000
Subject: Emulate missed parts of DSObject #1241
---
src/sugar/datastore/datastore.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/sugar/datastore/datastore.py b/src/sugar/datastore/datastore.py
index 0ad42b6..8d23721 100644
a
|
b
|
class RawObject(object): |
170 | 170 | def get_file_path(self, fetch=True): |
171 | 171 | # we have to create symlink since its a common practice |
172 | 172 | # to create hardlinks to jobject files |
| 173 | # and w/o this, it wouldn't work since we have file from mounted device |
173 | 174 | if self._file_path is None: |
174 | 175 | self._file_path = tempfile.mktemp( |
175 | 176 | prefix='rawobject', |
… |
… |
class RawObject(object): |
185 | 186 | return |
186 | 187 | self._destroyed = True |
187 | 188 | if self._file_path is not None: |
188 | | os.remove(self._file_path) |
| 189 | if os.path.exists(self._file_path): |
| 190 | os.remove(self._file_path) |
189 | 191 | self._file_path = None |
190 | 192 | |
191 | 193 | def __del__(self): |