Use newlines as separator for paths, not null chars
This commit is contained in:
parent
25d8e9bc75
commit
d58a0f459e
2 changed files with 6 additions and 5 deletions
|
@ -58,7 +58,7 @@ impl PathList {
|
||||||
let mut paths: Vec<PathBuf> = if serialized.paths.is_empty() {
|
let mut paths: Vec<PathBuf> = if serialized.paths.is_empty() {
|
||||||
Vec::new()
|
Vec::new()
|
||||||
} else {
|
} else {
|
||||||
serialized.paths.split('\0').map(PathBuf::from).collect()
|
serialized.paths.split('\n').map(PathBuf::from).collect()
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut order: Vec<usize> = serialized
|
let mut order: Vec<usize> = serialized
|
||||||
|
@ -84,7 +84,7 @@ impl PathList {
|
||||||
let mut paths = String::new();
|
let mut paths = String::new();
|
||||||
for path in self.paths.iter() {
|
for path in self.paths.iter() {
|
||||||
if !paths.is_empty() {
|
if !paths.is_empty() {
|
||||||
paths.push('\0');
|
paths.push('\n');
|
||||||
}
|
}
|
||||||
paths.push_str(&path.to_string_lossy());
|
paths.push_str(&path.to_string_lossy());
|
||||||
}
|
}
|
||||||
|
|
|
@ -553,7 +553,7 @@ impl Domain for WorkspaceDb {
|
||||||
WHEN workspaces.local_paths_array IS NULL OR workspaces.local_paths_array = "" THEN
|
WHEN workspaces.local_paths_array IS NULL OR workspaces.local_paths_array = "" THEN
|
||||||
NULL
|
NULL
|
||||||
ELSE
|
ELSE
|
||||||
replace(workspaces.local_paths_array, ',', '\0')
|
replace(workspaces.local_paths_array, ',', "\n")
|
||||||
END
|
END
|
||||||
END as paths,
|
END as paths,
|
||||||
|
|
||||||
|
@ -613,11 +613,12 @@ impl Domain for WorkspaceDb {
|
||||||
replace(
|
replace(
|
||||||
substr(paths, 3, length(paths) - 4),
|
substr(paths, 3, length(paths) - 4),
|
||||||
'"' || ',' || '"',
|
'"' || ',' || '"',
|
||||||
'\0'
|
CHAR(10)
|
||||||
)
|
)
|
||||||
ELSE
|
ELSE
|
||||||
replace(paths, ',', '\0')
|
replace(paths, ',', CHAR(10))
|
||||||
END
|
END
|
||||||
|
WHERE paths IS NOT NULL
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue