Trying to copy an XML from StreamingAssets to PersistentData for IOS

public const string myXMLpath = “/shop.xml”;

string sourcePath = System.IO.Path.Combine(Application.streamingAssetsPath, myXMLpath); 

string destPath = System.IO.Path.Combine(Application.persistentDataPath, myXMLpath); 

if (System.IO.File.Exists (sourcePath)) {
    System.IO.File.Copy (sourcePath, destPath, true);
}

Im trying to copy my XML from StreamingAssets into persistentData.

For some reason the If condition is always returning false >.<

And even if i remove the IF condition, (and just copy it) it will say that my file cannot be found.

But the shop.xml is totally just there :frowning:

Ive even tried combining sourcePath with Application.dataPath + “Raw/shop.xml”

Am i missing something? Any pointers will be really appreciated!!

After a nights sleep - and a fresh mind to tackle the problem again.

The solution was:

When using Path Combine - you don’t need the SLASH …

string myXMLpath = “/shop.xml”; (wrong)

string myXMLpath = “shop.xml”; (right)

Hope that helps >.<