check symlink file Signed-off-by:baozewei@huawei.com

Signed-off-by: b30052170 <baozewei@huawei.com>
This commit is contained in:
b30052170 2024-09-18 22:07:59 +08:00
parent 11b536d962
commit 57b5c5bad3

View File

@ -274,7 +274,7 @@ void PrintCupsClient::SymlinkDirectory(const char *srcDir, const char *destDir)
if (S_ISDIR(filestat.st_mode)) {
SymlinkDirectory(srcFilePath.c_str(), destFilePath.c_str());
} else if (lstat(destFilePath.c_str(), &destFilestat) == 0) {
PRINT_HILOGW("symlink lstat %{public}s err: %{public}s", destFilePath.c_str(), strerror(errno));
PRINT_HILOGD("symlink lstat %{public}s err: %{public}s", destFilePath.c_str(), strerror(errno));
if (S_ISLNK(destFilestat.st_mode)) {
PRINT_HILOGW("symlink already exists, continue.");