//If this a shared file\r
if (!cloudFile.Account.Equals(action.AccountInfo.UserName,StringComparison.InvariantCultureIgnoreCase))\r
{\r
- //If this is a read-only file, do not upload changes\r
+ \r
+/*\r
if (!cloudInfo.IsWritable(action.AccountInfo.UserName))\r
{\r
MakeFileReadOnly(fullFileName);\r
+ StatusKeeper.SetFileState(fullFileName, FileStatus.Unchanged, FileOverlayStatus.Normal, "");\r
return;\r
}\r
+*/\r
\r
- //If the file is new, can we upload it?\r
- if ( !cloudInfo.Exists && !client.CanUpload(account, cloudFile))\r
+ //If this is a read-only file, do not upload changes\r
+ if ( !cloudInfo.IsWritable(action.AccountInfo.UserName) ||\r
+ //If the file is new, but we can't upload it\r
+ (!cloudInfo.Exists && !client.CanUpload(account, cloudFile)) )\r
{\r
MakeFileReadOnly(fullFileName);\r
+ StatusKeeper.SetFileState(fullFileName, FileStatus.Unchanged, FileOverlayStatus.Normal, "");\r
return;\r
}\r
\r
//Do not make any modifications if not necessary\r
if (attributes.HasFlag(FileAttributes.ReadOnly))\r
return;\r
- File.SetAttributes(fullFileName, attributes | FileAttributes.ReadOnly);\r
+ File.SetAttributes(fullFileName, attributes | FileAttributes.ReadOnly); \r
}\r
\r
private static AccountInfo GetSharerAccount(string relativePath, AccountInfo accountInfo)\r