Bug 1848 - tl-rsync-all checks parameters incorrectly
Summary: tl-rsync-all checks parameters incorrectly
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: 1.4.1
Hardware: PC All
: P2 Normal
Target Milestone: MediumPrio
Assignee: Peter Åstrand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-10 16:00 CET by Inge Wallin
Modified: 2019-01-15 12:48 CET (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Inge Wallin cendio 2006-03-10 16:01:00 CET
 
Comment 1 Inge Wallin cendio 2006-03-10 16:05:33 CET
The following code is intended to check if a path to sync is included in the
command string:

    for arg in sys.argv[1:]:
        if not arg.startswith("-"):
            srcfound = 1
            arg = os.path.abspath(arg)
        cmdcommon.append(arg)

However, if we can't know if a parameter that doesn't start with a "-" is a path
to sync or an argument to a flag just before it.  At least, we can't know this
if we don't know which flags take arguments and which ones don't. 

We should use the options struct to find out.  Note that we can't only use the
prompt string since this problem can occur for long options too.

The correct way to solve this might be to create a general wrapper script
framework, in which case we should look over all our wrapper scripts.

Note You need to log in before you can comment on or make changes to this bug.