I’m trying to move a folderitem from one volume to the other and get an os error. Copying works ok. Moving on the same volume is fine. But moving across volumes does not work. Couldn’t find anything anywhere mentioning it’s not supposed to work.
System: Ubuntu 14.04 - x86 - 64 bits
reference to error codes: http://www.thegeekstuff.com/2010/10/linux-error-codes
/media/PJJDATA is a mounted volume pointing to a SD card (permissions are ok, my software reads/writes other stuff in that same folder)
/home/pjjadmin is the regular home folder of the current user (permissions are ok)
Sample:
'f1 is a valid file
f1 = new FolderItem("/media/PJJDATA/DownloadCache/PJJRadioPlayer.zip",FolderItem.PathTypeNative)
'f2 is a valid destination, /home/pjjadmin is a valid directory but the file itself does not exist
f2 = new FolderItem("/home/pjjadmin/PJJRadioPlayer.zip",FolderItem.PathTypeNative)
f1.movefileto f2
'f1.lasterrorcode is set to 18 : EXDEV Cross-device link
f1.copyfileto f2
'works ok
That’s the workaround I was about to implement. Either that or use a shell and call “mv” with the shell paths. I understand it’s an OS problem, maybe there could be a note in the Documentation to this effect.
@Norman Palardy
Before I file a bug report, I’d like to confirm that the expected behaviour is for the framework to detect when a direct move cannot be made and to compensate behind the scenes with a copy/delete combination. If so, I’ll file a bug report.
@Paul Lefebvre
If it’s not, I’ll file a request to add a note/warning in the docs.
Or… a bug report for the new framework and a warning in the doc for the classic ??? :-p
[quote=295039:@Bruno Frechette]@Norman Palardy
Before I file a bug report, I’d like to confirm that the expected behaviour is for the framework to detect when a direct move cannot be made and to compensate behind the scenes with a copy/delete combination. If so, I’ll file a bug report.[/quote]
As far as I can see that should occur