diff options
| author | Michael Biebl <biebl@debian.org> | 2011-08-23 19:17:03 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2011-08-23 19:17:03 +0200 |
| commit | 72acf6b5cf8cf7df57288a5ebca56cd84d21ff62 (patch) | |
| tree | 45a40c078a86d4043a303ca0f81735daf263f175 /src/settings/plugins/keyfile/writer.c | |
| parent | 232698d28a1764e179f668f480738b8c7117e70a (diff) | |
| parent | 263bf4c0c89bb88dc995acd9a6a2de9095fbd461 (diff) | |
Merge commit 'upstream/0.9.0' into experimental
Diffstat (limited to 'src/settings/plugins/keyfile/writer.c')
| -rw-r--r-- | src/settings/plugins/keyfile/writer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/settings/plugins/keyfile/writer.c b/src/settings/plugins/keyfile/writer.c index eeb14556..060093ce 100644 --- a/src/settings/plugins/keyfile/writer.c +++ b/src/settings/plugins/keyfile/writer.c @@ -668,6 +668,16 @@ cert_writer (GKeyFile *file, if (scheme == NM_SETTING_802_1X_CK_SCHEME_PATH) { path = objtype->path_func (NM_SETTING_802_1X (setting)); g_assert (path); + + /* If the path is rooted in the keyfile directory, just use a + * relative path instead of an absolute one. + */ + if (g_str_has_prefix (path, keyfile_dir)) { + path += strlen (keyfile_dir); + while (*path == '/') + path++; + } + g_key_file_set_string (file, setting_name, key, path); } else if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) { const GByteArray *blob; |