Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
89eb8c6e
Commit
89eb8c6e
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Linux build fix
parent
fb085372
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llcommon/llfile.cpp
+31
-0
31 additions, 0 deletions
indra/llcommon/llfile.cpp
indra/llcommon/llfile.h
+2
-0
2 additions, 0 deletions
indra/llcommon/llfile.h
indra/llfilesystem/llfilesystem.cpp
+0
-4
0 additions, 4 deletions
indra/llfilesystem/llfilesystem.cpp
with
33 additions
and
4 deletions
indra/llcommon/llfile.cpp
+
31
−
0
View file @
89eb8c6e
...
@@ -454,6 +454,37 @@ bool LLFile::copy(const std::string& from, const std::string& to)
...
@@ -454,6 +454,37 @@ bool LLFile::copy(const std::string& from, const std::string& to)
return
copied
;
return
copied
;
}
}
bool
LLFile
::
copy
(
const
boost
::
filesystem
::
path
&
from
,
const
boost
::
filesystem
::
path
&
to
)
{
bool
copied
=
false
;
LLFILE
*
in
=
LLFile
::
fopen
(
from
,
TEXT
(
"rb"
));
/* Flawfinder: ignore */
if
(
in
)
{
LLFILE
*
out
=
LLFile
::
fopen
(
to
,
TEXT
(
"wb"
));
/* Flawfinder: ignore */
if
(
out
)
{
char
buf
[
16384
];
/* Flawfinder: ignore */
size_t
readbytes
;
bool
write_ok
=
true
;
while
(
write_ok
&&
(
readbytes
=
fread
(
buf
,
1
,
16384
,
in
)))
/* Flawfinder: ignore */
{
if
(
fwrite
(
buf
,
1
,
readbytes
,
out
)
!=
readbytes
)
{
LL_WARNS
(
"LLFile"
)
<<
"Short write"
<<
LL_ENDL
;
write_ok
=
false
;
}
}
if
(
write_ok
)
{
copied
=
true
;
}
fclose
(
out
);
}
fclose
(
in
);
}
return
copied
;
}
int
LLFile
::
stat
(
const
std
::
string
&
filename
,
llstat
*
filestatus
)
int
LLFile
::
stat
(
const
std
::
string
&
filename
,
llstat
*
filestatus
)
{
{
#if LL_WINDOWS
#if LL_WINDOWS
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/llfile.h
+
2
−
0
View file @
89eb8c6e
...
@@ -64,6 +64,7 @@ typedef struct stat llstat;
...
@@ -64,6 +64,7 @@ typedef struct stat llstat;
#define MODE_T const wchar_t*
#define MODE_T const wchar_t*
#else
#else
#define MODE_T const char*
#define MODE_T const char*
#define TEXT(quote)
#endif
#endif
class
LL_COMMON_API
LLFile
class
LL_COMMON_API
LLFile
...
@@ -87,6 +88,7 @@ class LL_COMMON_API LLFile
...
@@ -87,6 +88,7 @@ class LL_COMMON_API LLFile
static
int
rename
(
const
std
::
string
&
filename
,
const
std
::
string
&
newname
,
int
supress_error
=
0
);
static
int
rename
(
const
std
::
string
&
filename
,
const
std
::
string
&
newname
,
int
supress_error
=
0
);
static
int
rename
(
const
boost
::
filesystem
::
path
&
filename
,
const
boost
::
filesystem
::
path
&
newname
,
int
supress_error
=
0
);
static
int
rename
(
const
boost
::
filesystem
::
path
&
filename
,
const
boost
::
filesystem
::
path
&
newname
,
int
supress_error
=
0
);
static
bool
copy
(
const
std
::
string
&
from
,
const
std
::
string
&
to
);
static
bool
copy
(
const
std
::
string
&
from
,
const
std
::
string
&
to
);
static
bool
copy
(
const
boost
::
filesystem
::
path
&
from
,
const
boost
::
filesystem
::
path
&
to
);
static
int
stat
(
const
std
::
string
&
filename
,
llstat
*
file_status
);
static
int
stat
(
const
std
::
string
&
filename
,
llstat
*
file_status
);
static
int
stat
(
const
boost
::
filesystem
::
path
&
filename
,
llstat
*
file_status
);
static
int
stat
(
const
boost
::
filesystem
::
path
&
filename
,
llstat
*
file_status
);
...
...
This diff is collapsed.
Click to expand it.
indra/llfilesystem/llfilesystem.cpp
+
0
−
4
View file @
89eb8c6e
...
@@ -36,10 +36,6 @@
...
@@ -36,10 +36,6 @@
#include
<boost/filesystem.hpp>
#include
<boost/filesystem.hpp>
#ifndef TEXT
#define TEXT(quote)
#endif
LLFileSystem
::
LLFileSystem
(
const
LLUUID
&
file_id
,
const
LLAssetType
::
EType
file_type
,
S32
mode
)
LLFileSystem
::
LLFileSystem
(
const
LLUUID
&
file_id
,
const
LLAssetType
::
EType
file_type
,
S32
mode
)
:
mFileID
(
file_id
),
:
mFileID
(
file_id
),
mFileType
(
file_type
),
mFileType
(
file_type
),
...
...
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