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

fprime-gds: file downlink removes leading directories #2658

Open
timcanham opened this issue Apr 3, 2024 · 1 comment
Open

fprime-gds: file downlink removes leading directories #2658

timcanham opened this issue Apr 3, 2024 · 1 comment
Labels
bug F´ GDS Issues pertaining to the F´ GDS

Comments

@timcanham
Copy link
Collaborator

timcanham commented Apr 3, 2024

F´ Version v3.4.3
Affected Component n/a

Problem Description

Add destination directory back in some form. Having raw names can cause overwrites.

Context / Environment

Execute fprime-util version-check and share the output.

(p3fprime) tcanham@MT-509434:~/source/fprime/Ref$ fprime-util version-check
Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python version: 3.10.12
CMake version: 3.22.1
Pip version: 22.0.2
Pip packages:
    fprime-tools==3.4.4
    fprime-gds==3.4.3
    fprime-fpp-*==2.1.0a5```

How to Reproduce

  1. Downlink a file with a destination with a directory path
  2. Look at file name. Is something like ._Foo.bar

Expected Behavior

Normalize the file path and create the directory path to retain directory separation. If it's not desirable to create directories, perhaps use a notation like dir_path_file to preserve the separation.

@timcanham timcanham added the bug label Apr 3, 2024
@thomas-bc thomas-bc added the F´ GDS Issues pertaining to the F´ GDS label Apr 3, 2024
@Joshua-Anderson
Copy link
Collaborator

Joshua-Anderson commented Apr 3, 2024

It's also not uncommon to downlink the same file multiple times, so it would be nice to support that to. (Ex. Run a sequence that generates a logfile)

What I might recommend is:

  • Store downlinked files locally in the GDS as <GDS_DL_TMP_DIR>/<random string>-<filename>
  • In the HTML UI, show their filename as the full filepath
  • When downloading, set the filename to be the normal filename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug F´ GDS Issues pertaining to the F´ GDS
Projects
None yet
Development

No branches or pull requests

3 participants