New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When Target Folder is unspecified, Drive file must be allowed to reside in any folder. #14
Comments
I think the old plugin would look for any Drive file, in any folder. If the file had the same name as the Windows database file it would sync to it. But what if multiple files with the target name are organized in separate folders, say, for change management? Which one should it use? Personally, with respect to file locations, I think the plugin should treat Drive like a conventional hierarchical file system if possible, to avoid user errors and duplication. What do you think? But anyway, the current plugin's "top-level or root folder only" limitation is arbitrary. The main limiting factor is the programmer's novice status with the Drive API. It is certainly possible to target any folder, regardless of nested-folder depth, with the API. Would this be useful? The "add a shortcut" feature of Drive allows you to "link" one file to multiple folders without duplication, and so it may be a workaround for you until there is a general solution. Thanks for this observation and your kind words. |
It would be very nice, if the plugin also look in any folder if the file exists. For basic setup I think there shouldn't be a duplicate file with the same name. Otherwise you must be sure to set the right folder for any device you are using. If root folder was set in the plugin as default and your file was in another folder before, then it will sync without noticeably issue for the user but while syncing from other devices which will use the file which is in another folder, you will loose some information because you have synced to the root folder before. I think best practice and for those people who are not care about any folder structures should be like I described: The plugin should look for that file first if it exist anywhere and avoid double files. By the way if you do not have any file with the same name in your drive, the plugin will sync it to the root folder. But also if the user move the file in another folder, the plugin will keep working without any issues, because it will always sync to the right file. Of course It would be also possible to to specify the subfolder in the plugin. But if you change or move the folder in Drive, you have to configure the plugin again. For this behavior I can not see any advantage to have seperate files with the same name in different folders. I would suggest following workflow for basic setup when target folder field in plugin is blank: Check if file with same name exists By the way, I have created a shortcut from the file (which is in a sub folder) to the root folder. But while syncing the plugin gives an error message: Thank you for your effort 👍 |
Thanks for the response. You have convincing arguments that this is a regression:
We can resolve this by retaining the former behavior when a Target Folder is not specified, and the latter only when a Target Folder is specified. And then there may be two other outstanding issues that effect Target Folders:
I'll enter new issues for these later. |
Leave folder out of query if not specified. Update text and labels to reflect no-folder semantics. (issue #14)
Hello,
first of all thank you very much for your work.
My Keepass File is stored in a Subfolder in Drive : Keepass\Database\KeepassFile.kdbx
Now if sync with Drive, the file will be created in the root folder. I think the old plugin was checking if the filename is present and then sync. I was able to move the file where ever I want and had no problems for sync. I have tried to set the Target Sync Folder in the options but it is not possible to set a Subfolder like Keepass\Database. How can we solve this issue? Maybe it is possible to check first if target file is present on Drive and assume its folder structure. Otherwise the plugin creates a second file (with the same name) in the root folder and after then the snyc does not work for other clients because the file exists twice.
Thank you.
The text was updated successfully, but these errors were encountered: