Google Drive KIOSlave

Friedrich W. H. Kossebau kossebau at
Thu Sep 27 17:34:31 BST 2012

Hi Andrius,

Am Donnerstag, 27. September 2012, 08:23:46 schrieb Andrius da Costa Ribas:
> 2. Google drive allows identical filenames.
> -files have a unique id, but can have the very same filename. It would not
> be practical to use the id in the kio url, but using the filename may lead
> to conflicts. Google drive windows syncing program renames the second file
> (e.g. "file.txt" and "file (2).txt") but only in the syncing folder,
> however I don't think this is a clean solution for a kioslave.

You can prevent the conflicts by using the field UDS_DISPLAY_NAME in the 
UDSEntry object you create for a file. Set that field to the filename. In the 
url you better use the id, does not look pretty, but usually people only look 
at the names of the items in the currently selected folder.


(In a perfect world the breadcrumbbar would also use the display name data for 
the display if not in url mode, no idea if it does, if not file a bug :) )

Only problem here will be that programs which get a file passed from your kio-
slave will see the id name, not the nice display name, as that information 
gets dropped. This is a problem your kio-slave will share with all others that 

Have a look at other kio-slaves using it:

> 3. It apparently has no character restriction on filenames.
> -windows syncing app replaces unsupported characters with underscores. I
> think percent encoding would be a better solution.

In theory linux file systems (at least the oldschool ones) also have no 
character restriction, they are just strings of bytes, interpretation left to 
user/programs. No idea how the KIO system handles copying of files between 
filesystems with different character restrictions.
Still I think nothing you have to care about in your kio slave, that is left 
to the parts of KIO which get a file from your kio slave, e.g. if copying, and 
have more restrictions.


More information about the kde-core-devel mailing list