Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/Feature Request: return full absolute path with --getopenfilename and --getsavefilename #4

Open
scott092707 opened this issue Mar 1, 2021 · 1 comment

Comments

@scott092707
Copy link

scott092707 commented Mar 1, 2021

When I use --getsavefilename and [startDir], the full filename returned by pydialog is not the full absolute path.

If I use [startDir] as /home/scott, and then write in aaa.txt, I get:
./aaa.text instead of:
/home/scott/aaa.txt

If I use [startDir] as /home/scott, and then select Documents/ComputerRelated, and write in aaa.txt, I get:
Documents/ComputerRelated/aaa.txt, instead of:
/home/scott/Documents/ComputerRelated/aaa.txt

If I use [startDir] as /home/scott, and then I go up to / and then select /lib32 and enter aaa.txt, I get:
../../lib32/aaa.txt instead of
/usr/lib32/aaa.txt

I don't know if this is a bug, or it is intended to use what I suppose would be called relative addressing.

I have so far gotten around this by discovering 3 commands and applying them, to achieve the full absolute path:

dir=$(dirname $WFR_FileName)
base=$(basename $WFR_FileName)
WFR_FileName=$(readlink -f "$dir/$base")  # note the added '/' between the dir and base

One COULD, perhaps, add an argument --use-absolute-path or --use-relative-path ... depending on how you want to default the path style...

[I have not used the --getopenurl or --getsaveurl or --getexistingdirectory, to know if the situation is the same,
but it seems likely.]

@blackPantherOS
Copy link
Owner

We applied a hotfix here, we will review all reported function later 612e23f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants