Opened 8 years ago

Closed 7 years ago

#4477 closed defect (fixed)

Drag a link to the clipboard frame raise error

Reported by: manuq Owned by: erikos
Priority: Urgent Milestone: 0.102.0
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: New

Description

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'

Change History (6)

comment:1 Changed 8 years ago by dnarvaez

  • Milestone changed from 0.98 to Unspecified

comment:2 Changed 8 years ago by dnarvaez

  • Bug Status changed from Unconfirmed to New
  • Priority changed from Unspecified by Maintainer to Urgent

comment:3 Changed 7 years ago by dnarvaez

  • Milestone changed from Unspecified to 0.102

comment:4 Changed 7 years ago by gp94

I don't seem to reproduce the above error, everything works fine...

comment:5 Changed 7 years ago by native

I am not able to reproduce the error. When I try to drag a link to a frame, it works fine for me and it's reopening too when I drag it back to the browser. Can you provide more details ?

I am running sugar-build on my host machine running Linux Mint 15 Olivia.(32 bit version).

comment:6 Changed 7 years ago by godiard

  • Resolution set to fixed
  • Status changed from new to closed

Working ok in 0.102 (Browse version 156)

Note: See TracTickets for help on using tickets.