fixed #768: Check and refresh authentication in GoogleDrive.SetPermissions

This commit is contained in:
Jaex 2015-07-07 08:30:50 +03:00
parent 606b9b2c3f
commit 5dba6f96c6
3 changed files with 6 additions and 4 deletions

View file

@ -3,8 +3,8 @@
[Setup]
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
AppVersion={#AppVersion}
Compression=lzma2/ultra64
DefaultDirName={pf}\{#AppName}
DefaultGroupName={#AppName}

View file

@ -9,7 +9,7 @@
#define MyAppId "82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC"
[Setup]
AppCopyright=Copyright © 2007-2015 {#MyAppPublisher}
AppCopyright=Copyright (C) 2007-2015 {#MyAppPublisher}
AppId={#MyAppId}
AppMutex={#MyAppId}
AppName={#MyAppName}
@ -40,10 +40,10 @@ UninstallDisplayName={#MyAppName}
VersionInfoCompany={#MyAppPublisher}
VersionInfoTextVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
WizardImageFile=WizardImageFile.bmp
WizardSmallImageFile=WizardSmallImageFile.bmp
WizardImageBackColor=clWhite
WizardImageFile=WizardImageFile.bmp
WizardImageStretch=no
WizardSmallImageFile=WizardSmallImageFile.bmp
[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"

View file

@ -166,6 +166,8 @@ private string GetMetadata(string title, string parentID)
private void SetPermissions(string fileID, GoogleDrivePermissionRole role, GoogleDrivePermissionType type, string value, bool withLink)
{
if (!CheckAuthorization()) return null;
string url = string.Format("https://www.googleapis.com/drive/v2/files/{0}/permissions", fileID);
string json = JsonConvert.SerializeObject(new