Skip to content

Commit

Permalink
Fix issues with special files
Browse files Browse the repository at this point in the history
  • Loading branch information
kra-mo committed Dec 22, 2023
1 parent 3b5b0b2 commit e831d6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hyperplane/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def __init__(self, gfile: Gio.File, **kwargs) -> None:
)
)

# TODO: Add trash date and origin path

attributes = {
# Basic info
Gio.FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
Expand Down
3 changes: 3 additions & 0 deletions hyperplane/utils/get_color_for_content_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def get_color_for_content_type(
) -> str:
"""Returns the color associated with a MIME type."""

if not content_type:
return "gray"

if content_type == "inode/directory":
return "blue"

Expand Down
1 change: 1 addition & 0 deletions hyperplane/utils/thumbnail.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def generate_thumbnail(
.to_unix()
)
except (GLib.Error, AttributeError):
callback(None, *args)
return

if not factory.can_thumbnail(uri, content_type, mtime):
Expand Down

0 comments on commit e831d6f

Please sign in to comment.