#10218 LOW 10.1.2: XO-1 os300 Read from USB stick using object chooser fails

Zarro Boogs per Child bugtracker at laptop.org
Fri Aug 6 08:12:55 EDT 2010


#10218: XO-1 os300 Read from USB stick using object chooser fails
-------------------------------------+--------------------------------------
           Reporter:  Quozl          |       Owner:  erikos                           
               Type:  defect         |      Status:  new                              
           Priority:  low            |   Milestone:  10.1.2                           
          Component:  read-activity  |     Version:  Development build as of this date
         Resolution:                 |    Keywords:  os301                            
        Next_action:  diagnose       |    Verified:  0                                
Deployment_affected:                 |   Blockedby:                                   
           Blocking:                 |  
-------------------------------------+--------------------------------------

Comment(by erikos):

 This patch for sugar-toolkit will do.

 {{{
 diff --git a/src/sugar/datastore/datastore.py
 b/src/sugar/datastore/datastore.py
 index 637c083..be272cc 100644
 --- a/src/sugar/datastore/datastore.py
 +++ b/src/sugar/datastore/datastore.py
 @@ -214,9 +214,11 @@ class RawObject(object):
          # to create hardlinks to jobject files
          # and w/o this, it wouldn't work since we have file from mounted
 device
          if self._file_path is None:
 +            data_path = os.path.join(env.get_profile_path(), 'data')
              self._file_path = tempfile.mktemp(
 -                    prefix='rawobject',
 -                    dir=os.path.join(env.get_profile_path(), 'data'))
 +                    prefix='rawobject', dir=data_path)
 +            if not os.path.exists(data_path):
 +                os.makedirs(data_path)
              os.symlink(self.object_id, self._file_path)
          return self._file_path
 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/10218#comment:6>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list