Modify compatibility manager
[platform/framework/native/installer.git] / src / Util / InstallerUtil.cpp
index 7be47c6..e07ee81 100755 (executable)
@@ -237,7 +237,7 @@ InstallerUtil::GetRealPath(const String& filePath, String& realPath)
 }
 
 bool
-InstallerUtil::CreateSymlink(const String& oldPath, const String& newPath)
+InstallerUtil::CreateSymlink(const String& oldPath, const String& newPath, bool SmackLabelToRealPath)
 {
        int err = -1;
        bool res = false;
@@ -260,7 +260,15 @@ InstallerUtil::CreateSymlink(const String& oldPath, const String& newPath)
 
        SmackManager smackManager;
        String label("_");
-       smackManager.AddLabelDir(label, newPath);
+
+       if (SmackLabelToRealPath == true)
+       {
+               smackManager.AddLabelDir(label, newPath);
+       }
+       else
+       {
+               smackManager.AddLabelSymlink(label, newPath);
+       }
 
        AppLog("CreateSymlink(): [%ls] -> [%ls]", newPath.GetPointer(), oldPath.GetPointer());