mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Create parents of screenshots directory
This commit is contained in:
committed by
Ivan Molodetskikh
parent
31eb943599
commit
b3245b81a6
+1
-1
@@ -5665,7 +5665,7 @@ impl Niri {
|
|||||||
if let Some(parent) = path.parent() {
|
if let Some(parent) = path.parent() {
|
||||||
// Relative paths with one component, i.e. "test.png", have Some("") parent.
|
// Relative paths with one component, i.e. "test.png", have Some("") parent.
|
||||||
if !parent.as_os_str().is_empty() {
|
if !parent.as_os_str().is_empty() {
|
||||||
if let Err(err) = std::fs::create_dir(parent) {
|
if let Err(err) = std::fs::create_dir_all(parent) {
|
||||||
if err.kind() != std::io::ErrorKind::AlreadyExists {
|
if err.kind() != std::io::ErrorKind::AlreadyExists {
|
||||||
warn!("error creating screenshot directory: {err:?}");
|
warn!("error creating screenshot directory: {err:?}");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user