"Invalid cross-device link" error when trying to rename to a different disk

Bug #566136 reported by Piotr Krukowiecki
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Phatch
Confirmed
Medium
Stani

Bug Description

I'm using phatch from ppa for karmic, 0.2.7.

It gives me this error:

Can not apply action Rename on image 'zima.jpg' in folder:
/media/...
(18, 'Invalid cross-device link')

The /media is just a removable disk, and the Rename parameters are left to default.

The log has following:

Error 0:Can not apply action Rename on image 'zima.jpg' in folder:
/media/2ee9fa70-9c2e-40a5-a350-6c17f163f563/ZdjeciaPodzielone/Test/Source

(18, 'Invalid cross-device link')

Action:{'fields': {'File Name': u'<filename>',
            'In': u'<desktop>/phatch/<subfolder>',
            '__enabled__': 'yes'},
 'label': 'Rename'}

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/phatch/core/api.py", line 614, in apply_action_to_photo
    photo = action.apply(photo, read_only_settings, cache)
  File "/usr/lib/python2.6/dist-packages/phatch/actions/rename.py", line 57, in apply
    os.rename(info['path'], filename)
OSError: [Errno 18] Invalid cross-device link
*

Revision history for this message
Piotr Krukowiecki (piotr-krukowiecki-news) wrote :

So this might be more of a wishlist ("support renaming/moving between disks/partitions")

Revision history for this message
Stani (stani) wrote :

The rename action should use shutil.move instead of os.rename. I'll fix that in the next release.

Changed in phatch:
assignee: nobody → Stani (stani)
importance: Undecided → Medium
milestone: none → 0.2.8
status: New → Confirmed
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.