mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 12:11:56 -07:00
compositor: more fs safety around tmp directories
HIS now includes a random bit, and hyprland will bail if /tmp/hypr is not a directory or if /tmp/hypr/his exists
This commit is contained in:
@@ -51,7 +51,7 @@ std::vector<SInstanceData> instances() {
|
||||
data->id = data->id.substr(data->id.find_last_of('/') + 1, data->id.find(".lock") - data->id.find_last_of('/') - 1);
|
||||
|
||||
try {
|
||||
data->time = std::stoull(data->id.substr(data->id.find_first_of('_') + 1));
|
||||
data->time = std::stoull(data->id.substr(data->id.find_first_of('_') + 1, data->id.find_last_of('_') - (data->id.find_first_of('_') + 1)));
|
||||
} catch (std::exception& e) { continue; }
|
||||
|
||||
// read file
|
||||
|
Reference in New Issue
Block a user