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

bugfix: handle absolute and relative paths as expected #31

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

ZinoKader
Copy link
Member

@ZinoKader ZinoKader commented Jan 18, 2023

Previous behavior would take the absolute or relative path and expand the directory structure onto the receiver. This is not what one expects when for instance sending files using the absolute path
portal send /home/zinokader/data/somefile.txt,
which previously would actually try to recreate the same directory structure /home/zinokader... on the receiver end.

Now, we handle absolute paths by sending the last directory or file (and its subfiles/subdirectories), this means /home/zinokader/folder will just send and expand folder and all of its contents on the receiving end.

fixes #30

Previous behavior would take the absolute or relative path and
expand the directory structure onto the receiver. This is not what
one expects when for instance sending files using the absolute path
"portal send /home/zinokader/data/somefile.txt", which previously would
actually try to recreate the same directory structure "/home/zinokader..."
on the receiver end.

Now, we handle absolute paths by sending the last directory or file
(and its subfiles/subdirectories), this means "/home/zinokader/folder"
will just send and expand "folder" and all of its contents on the receiving end.
@ZinoKader ZinoKader requested a review from mellonnen January 18, 2023 00:36
@ZinoKader ZinoKader merged commit 130953d into develop Jan 18, 2023
@ZinoKader ZinoKader deleted the fix/absolute-paths branch January 18, 2023 15:02
ZinoKader added a commit that referenced this pull request Jan 18, 2023
* feat: use zap everywhere

* bugfix: handle absolute and relative paths as expected (#31)

* chore: ignore .vscode folder

* feat: handle absolute and relative paths as expected

Previous behavior would take the absolute or relative path and
expand the directory structure onto the receiver. This is not what
one expects when for instance sending files using the absolute path
"portal send /home/zinokader/data/somefile.txt", which previously would
actually try to recreate the same directory structure "/home/zinokader..."
on the receiver end.

Now, we handle absolute paths by sending the last directory or file
(and its subfiles/subdirectories), this means "/home/zinokader/folder"
will just send and expand "folder" and all of its contents on the receiving end.
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

Successfully merging this pull request may close these issues.

1 participant