Terminal page right-click "Paste file" context menu option is not working.

Bug #1909600 reported by Cubic PPA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Fix Released
Low
Unassigned

Bug Description

Selecting "Paste file" from the right-click context menu on the Terminal page does not work.

Exception when copying a file using the right-click context menu...

    Copy file(s)
    Exception in thread Thread-7:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
        self.run()
      File "/usr/lib/python3.8/threading.py", line 870, in run
        self._target(*self._args, **self._kwargs)
      File "/usr/share/cubic/navigator.py", line 407, in navigate
        result = page.leave(action, new_page) if page else None
      File "/usr/share/cubic/pages/terminal_copy_page.py", line 132, in leave
        copy_files(model.current_directory, model.selected_uris)
      File "/usr/share/cubic/pages/terminal_copy_page.py", line 206, in copy_files
        target_directory = os.path.abspath(os.path.join(model.project.custom_root_directory, current_directory.strip(os.path.sep)))
    AttributeError: 'NoneType' object has no attribute 'strip'
      • Clicked................................ Cancel

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Work-around is to use the Copy file header bar button on simply drag the file onto the Terminal page, until this bug is fixed.

Changed in cubic:
importance: Undecided → Low
status: New → Confirmed
status: Confirmed → Triaged
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

This bug only happens if the right-click copy file context menu item is the *first* copy method selected to copy files. If the top-bar copy button or the drag-and-drop methods are chosen first, subsequent usage of the right-click copy file context menu item will work.

This error occurs because the current directory is None. This should not be the case.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

The right-click copy file context menu item does not get the current directory. Instead it relies on the previous value of current directory.
As a result, the right-click copy file context menu item may copy files to the wrong directory.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

We need to set the current directory when the right-click copy file context menu item is selected.

This is done for the header-bar copy files button and for the drag-and-drop copy files function, but was missing for the right-click copy file context menu item.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Fix released in version 2021.01-39-release.

Cubic PPA (cubic-wizard)
Changed in cubic:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.