This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with embedded spaces in path name for --info-script switch in tar

Using tar-1.15.1-4.

I am writing a script to create multi-volume archives using tar. However it
appears that the --info-script switch doesn't handle imbedded spaces in the path name.
In the sample script below, I have hard-encoded the path to verify that was the problem
and not with building the variable with the path name.

export ARCHIVE_DIR=/cygdrive/d
export ARCHIVE_NAME=full_`date +%y%m%d`

tar -cv \
--ignore-failed-read \
--exclude=pagefile.sys \
--exclude=*.vsv \
-L4096 \
-M --info-script="/cygdrive/c/Documents and Settings/Liedtke/My Documents/Tasks/Backup/" \

# End script

Output is:
tar: and: Warning: Cannot stat: No such file or directory.
tar: Settings/Liedtke/My: Warning: Cannot stat: No such file or directory.
tar: Documents/Tasks/Backup/ Warning: Cannot stat: No such file or directory

I've devised a workaround by copying the script to the PWD previous to the tar command and then
deleting it. But it should work as above, correct?

I've searched for the problem on the web and found nothing. Am I missing something
obvious, or is this switch not handling embedded spaces in the path name correctly?
(Thank you Microsoft.)

Brian Liedtke

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]