From: Michal Bloch Date: Mon, 24 Oct 2022 15:47:14 +0000 (+0200) Subject: Work-around a sub session creation issue X-Git-Tag: accepted/tizen/unified/20221102.172730~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35b0a0ba8583ecd461331e05e22f5efc39bc48a8;p=platform%2Fcore%2Fsystem%2Fsessiond.git Work-around a sub session creation issue Seems to be a libsmack issue at a glance. Change-Id: I10dfc7e3cbc83450d730eaf4d008ac33e9b50a4b Signed-off-by: Michal Bloch --- diff --git a/src/service/src/fs_helpers.cpp b/src/service/src/fs_helpers.cpp index 504cb9e..c11d797 100644 --- a/src/service/src/fs_helpers.cpp +++ b/src/service/src/fs_helpers.cpp @@ -139,6 +139,15 @@ static int copy_label(auto label, auto dest_path, auto type) return 0; } + /* WORK-AROUND. It appears that for symlinks, ENOENT + * is returned instead of ENODATA but otherwise has + * the same meaning. We can be certain of the existence + * of the files because we wouldn't have reached here + * if creation failed, so don't bother checking for a + * false negative, and ignore this error. */ + if (ret == -1 && errno == ENOENT) + return 0; + return ret; }