[Bugs] #4477 sugar UNSP: Drag a link to the clipboard frame raise error

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Thu Apr 4 10:26:15 EDT 2013


#4477: Drag a link to the clipboard frame raise error
------------------------------------------+---------------------------------
    Reporter:  manuq                      |          Owner:  erikos     
        Type:  defect                     |         Status:  new        
    Priority:  Unspecified by Maintainer  |      Milestone:  0.98       
   Component:  sugar                      |        Version:  Unspecified
    Severity:  Unspecified                |       Keywords:             
Distribution:  Unspecified                |   Status_field:  Unconfirmed
------------------------------------------+---------------------------------
 Fixing the drag and drop issues in #3819, an error appears if a link is
 dragged from Browse activity to the frame.

 TestCase

 1. Open Browse.  Navigate to a page with links.
 2. Bring up the frame.
 3. Drag a link to the frame.

 The current code calls Python shutil.copyfile with the URL path, which
 obviously fails with "file not found".

 [1] http://docs.python.org/2/library/shutil.html#shutil.copyfile

 {{{
 Traceback (most recent call last):
   File "/home/manuq/sugar-build/install/lib/python2.7/site-
 packages/jarabe/frame/clipboardtray.py", line 193, in
 drag_data_received_cb
     self._add_selection(object_id, selection)
   File "/home/manuq/sugar-build/install/lib/python2.7/site-
 packages/jarabe/frame/clipboardtray.py", line 108, in _add_selection
     on_disk=True)
   File "/home/manuq/sugar-build/install/lib/python2.7/site-
 packages/jarabe/frame/clipboard.py", line 89, in add_object_format
     new_uri = self._copy_file(data)
   File "/home/manuq/sugar-build/install/lib/python2.7/site-
 packages/jarabe/frame/clipboard.py", line 167, in _copy_file
     shutil.copyfile(path, new_file_path)
   File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
     with open(src, 'rb') as fsrc:
 IOError: [Errno 2] No existe el fichero o el directorio:
 '/gtk3/stable/GtkCssProvider.html'
 }}}

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4477>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list