- fix: files in network drive is opened in readonly mode
This commit is contained in:
parent
8d4411ee55
commit
829e73895b
1
NEWS.md
1
NEWS.md
|
@ -1,6 +1,7 @@
|
|||
Red Panda C++ Version 1.2
|
||||
|
||||
- enhancement: Portuguese Translation ( Thanks for crcpucmg@github)
|
||||
- fix: files in network drive is opened in readonly mode
|
||||
|
||||
Red Panda C++ Version 1.1.6
|
||||
|
||||
|
|
|
@ -425,14 +425,15 @@ bool isSystemHeaderFile(const QString &fileName, const QSet<QString> &includePat
|
|||
if (includePaths.isEmpty())
|
||||
return false;
|
||||
bool isFullName = false;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
isFullName = fileName.length()>2 && fileName[1]==':';
|
||||
isFullName = fileName.startsWith("/") || (fileName.length()>2 && fileName[1]==':');
|
||||
#else
|
||||
isFullName = fileName.startsWith("/");
|
||||
#endif
|
||||
if (isFullName) {
|
||||
// If it's a full file name, check if its directory is an include path
|
||||
QFileInfo info(fileName);
|
||||
// If it's a full file name, check if its directory is an include path
|
||||
if (info.exists()) { // full file name
|
||||
QDir dir = info.dir();
|
||||
QString absPath = includeTrailingPathDelimiter(dir.absolutePath());
|
||||
|
|
Loading…
Reference in New Issue