diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index be00bbf30cd..16dd6739593 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -1043,7 +1044,12 @@ bool PerforcePluginPrivate::vcsOpen(const FilePath &workingDir, const QString &f flags |= SilentStdOut; } const PerforceResponse result = runP4Cmd(workingDir, args, flags); - return !result.error; + if (result.error) + return false; + const FilePath absPath = workingDir.resolvePath(fileName); + if (DocumentModel::Entry *e = DocumentModel::entryForFilePath(absPath)) + e->document->checkPermissions(); + return true; } bool PerforcePluginPrivate::vcsAdd(const FilePath &workingDir, const QString &fileName)