mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
Path::strip_last_element removes path delimiter
Remove the trailing slash of a path where the path is not "/". New Path::append_element convenience function. Fixes #1744
This commit is contained in:
committed by
Christian Helmuth
parent
8b78001858
commit
0a01edded2
@ -4,6 +4,13 @@
|
||||
* \date 2012-04-11
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012-2016 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _FILE_SYSTEM__UTIL_H_
|
||||
#define _FILE_SYSTEM__UTIL_H_
|
||||
|
||||
@ -89,7 +96,6 @@ namespace File_system {
|
||||
} catch (Lookup_failed) {
|
||||
Genode::Path<MAX_PATH_LEN> target(path);
|
||||
target.strip_last_element();
|
||||
target.remove_trailing('/');
|
||||
fs.close(ensure_dir(fs, target.base()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user