dsplaisted / PCLStorage

PCL Storage - Portable Storage APIs
Microsoft Public License
305 stars 94 forks source link

CreateFolderAsync not working on UWP with spaces in the path #39

Closed JKennedy24 closed 8 years ago

JKennedy24 commented 8 years ago

If i call the following:

var res = myFolder.CreateFolderAsync(dir, CreationCollisionOption.OpenIfExists).Result;

where the Path is:

"C:\\Users\\My Admin\\AppData\\Local\\Packages\\guid\\LocalState\\App\\Folder"

Note the space in my "User"

I get the following exception:

The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at PCLStorage.WinRTFolder.d__12.MoveNext()

I guess its down to the space in my path

JKennedy24 commented 8 years ago

Turned out to be a bug in my program rather than this library