On Wed, Aug 16, 2006, EV wrote: > yourself. In this case, I think the copy-to command should have > to be something like: > > cp ~/music/A/B/C/blaBla.ogg mnt/ > > or, may be at most: > > cp ~/music/A/B/C/blaBla.ogg mnt/tune/
The problem is that there is no way of knowing what the new filename is going to be until *after* it has been copied, so there is no way to tell if a file with the same name exists until after the data has been written. > I know this may be confusing, but other possibilities I can > imagine are even more confusing. May be another possibility is > to create a (virtual) dir such as mnt/uploadSandBox/ where you > have to copy every tune whose path-formation properties are to be > extracted from tags. It will be understood that, if everything > goes well, mnt/uploadSandBox/ will be permanently empty and > you'll get the uploaded files in their due paths under mnt/tune. I think I prefer the "cp ~/music/A/B/C/blaBla.ogg mnt/tune/" syntax. Actually, the karma can handle identically named files without any problem. It is only in the filesystem where it becomes an issue. In fact, lkarmafs is already slightly broken in this area since it only lists the first entry if there is more than one file with the same name. Unfortunately there is no really obvious way around this problem since the karma's semantics are fundamentally different from those of a filesystem. Perhaps this is why Rio gave up on the idea? Since the karma already allows multiple files with the same name, we should probably just allow conflicting copies to happen and figure out a way of making them visible in the filesystem. I can't think of any workable solution for maintaining proper filesystem semantics. Usually, you would just allow the copy to overwrite the existing file but since we don't know what the filename is in advance then there is no way of making "cp -i", etc. work properly. Maybe the most sensible approach is to not allow this kind of thing at all. The filename is specified on open()/creat() and is not magically re-named afterwards. If people want to upload files based on their tagnames then they can use riocp or a script of some kind. Keith. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-karma-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-karma-devel
