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

Do not accept drop if location is unmounted #2391

Closed
wants to merge 13 commits into from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Jan 24, 2024

Fixes #2390
Fixes #2465

  • file_accepts_drop () returns false if location unmounted (fixes first issue)
  • Update the target location if mounted after Files started (fixes second issue)

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you resolve conflicts? It looks like maybe this function moved in another commit

# Conflicts fixed in:
#	libcore/FileUtils.vala
@jeremypw
Copy link
Collaborator Author

Conflict fixed

@jeremypw jeremypw requested a review from danirabbit May 27, 2024 16:03
@danirabbit
Copy link
Member

@jeremypw ah this is a +/-0 diff now 😅 That doesn't seem right

@jeremypw
Copy link
Collaborator Author

jeremypw commented Jun 15, 2024

Looks like libcore/FileUtils/file_accepts_drop function was moved elsewhere in main so need to rewrite this branch if the issue persists.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Jun 15, 2024

Noticed a related issue - the volume bookmarks only have a valid target file if they are already mounted when Files window is opened. In main, the target file is not updated if the volume is subsequently mounted so dropping a file on it still does not work in this branch. This is now fixed by updating the target file whenever the volume is mounted or unmounted.

@jeremypw
Copy link
Collaborator Author

@danirabbit This is now ready for review hopefully.

@jeremypw jeremypw dismissed danirabbit’s stale review July 14, 2024 18:06

Required changes made new review requested

@jeremypw jeremypw requested a review from a team July 29, 2024 16:35
@jeremypw jeremypw marked this pull request as draft July 29, 2024 16:50
@jeremypw
Copy link
Collaborator Author

Converting to draft to investigate bug where a (copy) file is created in the current working folder when Files is being run in a terminal and the file is dropped onto an unmounted volume.

@jeremypw jeremypw marked this pull request as ready for review July 30, 2024 17:31
@jeremypw
Copy link
Collaborator Author

For now, I have not implemented auto-mounting of unmounted volumes when dropped on. This could be implemented in a further PR if thought desirable.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Sep 1, 2024

Converting to draft to investigate bug where a (copy) file is created in the current working folder when Files is being run in a terminal and the file is dropped onto an unmounted volume.

I am no longer sure how to reproduce this bug so a shorter PR has been proposed omitting the related commit.

@jeremypw jeremypw marked this pull request as draft September 1, 2024 18:13
@jeremypw
Copy link
Collaborator Author

Closing in favour of #2466 and #2468

@jeremypw jeremypw closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants