Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
engine
Commits
5c1ea69c
Commit
5c1ea69c
authored
Jul 21, 2019
by
Ivan Dokunov
Browse files
Options
Downloads
Patches
Plain Diff
Correction of grammatical errors
parent
5dda8f4a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/core/FileSystem.cpp
+9
-9
9 additions, 9 deletions
source/core/FileSystem.cpp
source/core/FileSystem.h
+2
-2
2 additions, 2 deletions
source/core/FileSystem.h
with
11 additions
and
11 deletions
source/core/FileSystem.cpp
+
9
−
9
View file @
5c1ea69c
...
...
@@ -8,7 +8,7 @@
bool
CFileSystem
::
isFileOrDirectory
(
const
char
*
szPath
,
bool
isFile
)
{
char
*
path
=
getAbsol
i
teCanonizePath
(
szPath
);
char
*
path
=
getAbsol
u
teCanonizePath
(
szPath
);
if
(
!
path
)
{
...
...
@@ -66,7 +66,7 @@ char *CFileSystem::getNormalPath(const char *szPath)
return
rp
;
}
bool
CFileSystem
::
isAbsol
e
tePathInRoot
(
const
char
*
szPath
)
bool
CFileSystem
::
isAbsol
u
tePathInRoot
(
const
char
*
szPath
)
{
if
(
!
isAbsolutePath
(
szPath
))
{
...
...
@@ -80,7 +80,7 @@ bool CFileSystem::isAbsoletePathInRoot(const char *szPath)
return
pos
!=
nullptr
;
}
char
*
CFileSystem
::
getAbsol
i
teCanonizePath
(
const
char
*
szPath
)
char
*
CFileSystem
::
getAbsol
u
teCanonizePath
(
const
char
*
szPath
)
{
bool
absolute
=
isAbsolutePath
(
szPath
);
bool
correctPath
=
true
;
...
...
@@ -268,7 +268,7 @@ bool CFileSystem::resolvePath(const char *szPath, char *szOut, int iOutMax)
bool
CFileSystem
::
fileExists
(
const
char
*
szPath
)
{
char
*
path
=
getAbsol
i
teCanonizePath
(
szPath
);
char
*
path
=
getAbsol
u
teCanonizePath
(
szPath
);
if
(
!
path
)
{
...
...
@@ -281,7 +281,7 @@ bool CFileSystem::fileExists(const char *szPath)
size_t
CFileSystem
::
fileGetSize
(
const
char
*
szPath
)
{
char
*
path
=
getAbsol
i
teCanonizePath
(
szPath
);
char
*
path
=
getAbsol
u
teCanonizePath
(
szPath
);
if
(
!
path
)
{
...
...
@@ -315,7 +315,7 @@ bool CFileSystem::isDirectory(const char *szPath)
time_t
CFileSystem
::
getFileModifyTime
(
const
char
*
szPath
)
{
char
*
path
=
getAbsol
i
teCanonizePath
(
szPath
);
char
*
path
=
getAbsol
u
teCanonizePath
(
szPath
);
if
(
!
path
)
{
...
...
@@ -405,7 +405,7 @@ IFile *CFileSystem::openFile(const char *szPath, FILE_OPEN_MODE mode = FILE_MODE
return
nullptr
;
}
char
*
fullPath
=
getAbsol
i
teCanonizePath
(
szPath
);
char
*
fullPath
=
getAbsol
u
teCanonizePath
(
szPath
);
//Если по каким либо причинам нельзя вернуть полный путь - на выход
if
(
!
fullPath
&&
mode
==
FILE_MODE_READ
)
...
...
@@ -435,12 +435,12 @@ IFile *CFileSystem::openFile(const char *szPath, FILE_OPEN_MODE mode = FILE_MODE
*
newFileName
+=
'/'
;
*
newFileName
+=
szPath
;
fullPath
=
getAbsol
i
teCanonizePath
(
newFileName
->
c_str
());
fullPath
=
getAbsol
u
teCanonizePath
(
newFileName
->
c_str
());
mem_delete
(
newFileName
);
}
bool
inRoot
=
isAbsol
e
tePathInRoot
(
fullPath
);
bool
inRoot
=
isAbsol
u
tePathInRoot
(
fullPath
);
//Если путь в корне, и файла не существует - создаем его
if
(
inRoot
&&
!
fileExists
(
fullPath
))
...
...
This diff is collapsed.
Click to expand it.
source/core/FileSystem.h
+
2
−
2
View file @
5c1ea69c
...
...
@@ -90,10 +90,10 @@ private:
char
*
getNormalPath
(
const
char
*
szPath
);
//!Сравнивает пути с корнем, и возвращает true если путь - абсолютный и в корне
bool
isAbsol
e
tePathInRoot
(
const
char
*
szPath
);
bool
isAbsol
u
tePathInRoot
(
const
char
*
szPath
);
//! Возвращает абсолютный канонизированный путь
char
*
getAbsol
i
teCanonizePath
(
const
char
*
szPath
);
char
*
getAbsol
u
teCanonizePath
(
const
char
*
szPath
);
char
*
getFullPathToBuild
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment