mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: re-add the leak in os.join_path (the os.join_path(x, ...arr)
case should be handled by V). Add a memleak free os.join_path_single version.
This commit is contained in:
@ -191,7 +191,7 @@ pub fn file_size(path string) u64 {
|
||||
pub fn mv(src string, dst string) ? {
|
||||
mut rdst := dst
|
||||
if is_dir(rdst) {
|
||||
rdst = join_path(rdst.trim_right(path_separator), file_name(src.trim_right(path_separator)))
|
||||
rdst = join_path_single(rdst.trim_right(path_separator), file_name(src.trim_right(path_separator)))
|
||||
}
|
||||
$if windows {
|
||||
w_src := src.replace('/', '\\')
|
||||
|
Reference in New Issue
Block a user