Re: System.IO.DirectoryNotFoundException: Could not find a part of the path
Sascha Manns <[email protected]> Mon, 06 Feb 2017 22:53:35 +0100
| Newsgroups | gmane.comp.gnome.mono.general |
|---|---|
| Message-ID | <[email protected]> |
Am Montag, den 06.02.2017, 14:36 +0100 schrieb Sascha Manns:
> I removed now the relative path from EntityfileLocal and used:
>
> private static string ProjectDir => Targetdir +
> Path.DirectorySeparatorChar + PublicationTitle +
> Path.DirectorySeparatorChar +
> Language + Path.DirectorySeparatorChar;
> Directory.SetCurrentDirectory(ProjectDir); // is in that case
> /home/sascha/Dokumente/publican-xcom/articles/Test/de-DE/
>
> The directory is created in the method before that one and it's
> filled:
>
> sascha@sascha-desktop:~/Dokumente/publican-xcom/articles/Test/de-DE$
> ls
> Article_Info.xml Author_Group.xml images Revision_History.xml Tes
> t.ent Test.xml
>
> But after SetCurrentDirectory i'm getting:
>
> System.IO.DirectoryNotFoundException: Directory
> "/home/sascha/Dokumente/publican-xcom/articles/Test/de-DE/" not found
>
> The directory is in my /home/sascha and it's writable and accessable.
I found out something. The last method which will be executed before my
try to access with Directory.SetCurrentDirectory is:
private static void CreateDocu(string createstring)
{
var startInfo = new ProcessStartInfo
{
FileName = @"/usr/bin/publican",
Arguments = @"" + createstring
};
Process.Start(startInfo);
}
This process creates the needed directories and it looks like my
program doesn't wait for finishing the started process. But what can i
do that the Directory.SetCurrentDirectory waits 10 seconds or so?
Greetings
Sascha
_______________________________________________
Mono-list maillist - [email protected]
http://lists.dot.net/mailman/listinfo/mono-list
signature.asc
(application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJYmPBfAAoJEHUnY+i/qDosqtIP/0rEt/UrV6V52FhA7/3dn+5C gjWW+B0fBCz9E5cLRV056UAq4UAWqAcGJuNNc0zwg9ntUzLjwJY+xPxkhG2p8vsS gGiRmPiYCUuEHpxk7wG6du63uYzIAzUTJNs1dw6fdUZGRKGFbjSx6ZRuYuA9C1wa 4j2rc45HJ1zqqMxgCmhs+jj3Ml22tNTReYeVEksmP6CYaGEGCuc4gGgdUr+7yiNV UjT9Oe/O9hHKZ6OciNa66F7x4DNEO1sL9qJclzcyZZoZbhD0UqFPgJ2gjCUEXgal 9IN2+ojjB8cHuTLZ3oZevb5wncbdjfnHTz/xW18Jl8+6IJAd+AF+T9BNtDcSsG7p zVVqGBoUCtGuSBJHAfNkI1BPTbYrVDwTmEOsAFIu5D+/TWOtBkcBwMMT/KjJDsI4 b6vkCvemlu7AOgJHy+BOeN8IrB2Ilv+H61COJpnJ0kdjo363XRQfBkuZImqOggnD fzydyIqETFXjoEF1CZwqN1GplRL0t5GUhiTrdgz4y7s4aeFem3X/zOyKMs51ny1h uUJvw4HPvEL5lkh0S6oGHipboemXRL+1aLy87/xKUHXKeD7bxQGYhknB/yAmTuQl ckTF5z7z4Lv9GBP33TpGI8gxV0tZZht20JwfipU6tTBry5REVrYLUKa4jKeNNIz/ 4DKt2gUahOisvnvzwnBL =SMA+ -----END PGP SIGNATURE-----