Vincent Torri <vincent.to...@gmail.com> writes: > I would like to know, programmatically, if the the directory created > when a tarball is decompressed exists or not. The tarball is in this > directory: > > D:/Documents/msys2/opt/ewpi_test/share/ewpi/packages/foobar > > So I want to execute with system() : > > cd D:/Documents/msys2/opt/ewpi_test/share/ewpi/packages/foobar && > dir_name=`tar tzf foobar.tar.gz | head -1 | cut -f1 -d"/"` && cd > $dir_name > > If dir_name does not exists, cd will throw an error. I can use also a > test. The problem is not there anyway : when executed with system(), > dir_name is not known.
[snip] Are you using the MSYS2 toolchain or the Mingw-W64 toolchain? because `system' on the later uses the Windows shell (CMD.EXE or whatever). _______________________________________________ Msys2-users mailing list Msys2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/msys2-users