Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
poezio
poezio
Commits
1ce31d92
Verified
Commit
1ce31d92
authored
Aug 14, 2015
by
mathieui
Browse files
Make sure the default config copy is writeable
(benefits nixos and possibly other distributions’ packaging)
parent
a1bf66ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/config.py
src/config.py
+9
-0
No files found.
src/config.py
View file @
1ce31d92
...
...
@@ -14,6 +14,7 @@ DEFSECTION = "Poezio"
import
logging.config
import
os
import
stat
import
sys
import
pkg_resources
...
...
@@ -563,6 +564,14 @@ def run_cmdline_args(CONFIG_PATH):
copy2
(
default
,
options
.
filename
)
elif
path
.
isfile
(
other
):
copy2
(
other
,
options
.
filename
)
# Inside the nixstore and possibly other distributions, the reference
# file is readonly, so is the copy.
# Make it writable by the user who just created it.
if
os
.
path
.
exists
(
options
.
filename
):
os
.
chmod
(
options
.
filename
,
os
.
stat
(
options
.
filename
).
st_mode
|
stat
.
S_IWUSR
)
global
firstrun
firstrun
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment