Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
0d9e25c4
Commit
0d9e25c4
authored
5 years ago
by
Andreas Traczyk
Browse files
Options
Downloads
Patches
Plain Diff
fileutils: migrate windows files to local appdata
Change-Id: I3c334493e5f45a2c1d6398d396c2ad109a2f6a5d
parent
7f14365d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fileutils.cpp
+20
-1
20 additions, 1 deletion
src/fileutils.cpp
with
20 additions
and
1 deletion
src/fileutils.cpp
+
20
−
1
View file @
0d9e25c4
...
...
@@ -489,7 +489,6 @@ writeArchive(const std::string& archive_str, const std::string& path, const std:
}
}
FileHandle
::
FileHandle
(
const
std
::
string
&
n
)
:
fd
(
-
1
),
name
(
n
)
{}
...
...
@@ -623,6 +622,16 @@ get_data_dir(const char* pkg)
return
get_home_dir
()
+
DIR_SEPARATOR_STR
+
"Library"
+
DIR_SEPARATOR_STR
+
"Application Support"
+
DIR_SEPARATOR_STR
+
pkg
;
#elif defined(_WIN32)
if
(
!
strcmp
(
pkg
,
"ring"
))
{
return
get_home_dir
()
+
DIR_SEPARATOR_STR
+
".local"
+
DIR_SEPARATOR_STR
+
"share"
DIR_SEPARATOR_STR
+
pkg
;
}
else
{
return
get_home_dir
()
+
DIR_SEPARATOR_STR
+
"AppData"
+
DIR_SEPARATOR_STR
+
"Local"
+
DIR_SEPARATOR_STR
+
pkg
;
}
#elif defined (RING_UWP)
std
::
vector
<
std
::
string
>
paths
;
emitSignal
<
DRing
::
ConfigurationSignal
::
GetAppDataPath
>
(
""
,
&
paths
);
...
...
@@ -679,6 +688,16 @@ get_config_dir(const char* pkg)
std
::
string
configdir
=
fileutils
::
get_home_dir
()
+
DIR_SEPARATOR_STR
+
"Library"
+
DIR_SEPARATOR_STR
+
"Application Support"
+
DIR_SEPARATOR_STR
+
pkg
;
#elif defined(_WIN32)
std
::
string
configdir
;
if
(
!
strcmp
(
pkg
,
"ring"
))
{
configdir
=
fileutils
::
get_home_dir
()
+
DIR_SEPARATOR_STR
+
".config"
+
DIR_SEPARATOR_STR
+
pkg
;
}
else
{
configdir
=
fileutils
::
get_home_dir
()
+
DIR_SEPARATOR_STR
+
"AppData"
+
DIR_SEPARATOR_STR
+
"Local"
+
DIR_SEPARATOR_STR
+
pkg
;
}
#else
std
::
string
configdir
=
fileutils
::
get_home_dir
()
+
DIR_SEPARATOR_STR
+
".config"
+
DIR_SEPARATOR_STR
+
pkg
;
...
...
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