Add 'pcloud' to dangerous data directories

It seems like pCloud can sync arbitrary directories as well, but at
least some people use "pCloud Drive".
This commit is contained in:
Dan Stillman 2020-05-15 19:26:00 -04:00
parent c5783f093a
commit 6676ece3e4

View file

@ -1347,27 +1347,17 @@ Zotero.File = new function(){
this.isCloudStorageFolder = function (path) {
return this.isDropboxDirectory(path)
|| this.isGoogleDriveDirectory(path)
|| this.isOneDriveDirectory(path);
// Dropbox
return path.toLowerCase().includes('dropbox')
// Google Drive
|| path.includes('Google Drive')
// OneDrive
|| path.toLowerCase().includes('onedrive')
// pCloud
|| path.toLowerCase().includes('pcloud');
};
this.isDropboxDirectory = function(path) {
return path.toLowerCase().includes('dropbox');
}
this.isGoogleDriveDirectory = function(path) {
return path.includes('Google Drive');
}
this.isOneDriveDirectory = function(path) {
return path.toLowerCase().includes('onedrive');
}
this.reveal = Zotero.Promise.coroutine(function* (file) {
if (!(yield OS.File.exists(file))) {
throw new Error(file + " does not exist");