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

Bug #566136 reported by Piotr Krukowiecki on 2010-04-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Phatch
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
*

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

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  Edit
Everyone can see this information.

Other bug subscribers