Opened 14 years ago

Closed 22 months ago

#5783 closed bug (fixed)

[Tracker] don't try to fix executable bit on read only file systems

Reported by: diver Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: Applications/Tracker Version: R1/Development
Keywords: Cc: siarzhuk
Blocked By: Blocking:
Platform: All

Description

Some files (e.g. images) from my ext3 have executable bit set. Trying to open such files results in a tracker message:


If I try to fix it tracker shows:


The only way I could open such files is to use Open with menu.
I think that offering to fix executable bit on read only partitions doesn't make any sense.

Attachments (2)

tracker_alert.png (6.7 KB ) - added by diver 14 years ago.
tracker_alert_2.png (4.7 KB ) - added by diver 14 years ago.

Download all attachments as: .zip

Change History (13)

by diver, 14 years ago

Attachment: tracker_alert.png added

by diver, 14 years ago

Attachment: tracker_alert_2.png added

comment:1 by diver, 12 years ago

Blocking: 8428 added

comment:2 by diver, 12 years ago

Blocking: 8428 removed

comment:3 by diver, 12 years ago

This is also the case for vboxsf file system.

comment:4 by diver, 12 years ago

Probably there should be a check for volume.IsReadOnly() in TrackerLaunchDocuments() in FSUtils.cpp.

comment:5 by diver, 11 years ago

Cc: siarzhuk added
diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp
index 8a75bbc..152731f 100644
--- a/src/kits/tracker/FSUtils.cpp
+++ b/src/kits/tracker/FSUtils.cpp
@@ -3469,7 +3469,8 @@ _TrackerLaunchDocuments(const entry_ref* /*doNotUse*/, const BMessage* refs,
                                "The file is mistakenly marked as executable. "));
                        alertString.ReplaceFirst("%name", app.name);
 
-                       if (!openWithOK) {
+                       BVolume volume(documentRef.device);
+                       if (!openWithOK && !volume.IsReadOnly()) {
                                // offer the possibility to change the permissions
 
                                alertString << B_TRANSLATE("\nShould this be fixed?");

With the above change launching a file fails with "The file is mistakenly marked as executable." error.

comment:6 by jessicah, 11 years ago

I think the better fix in the case of a read-only file-system would be to set some sort of flag to ignore the executable bit to emulate what happens when retrying after successfully unsetting the executable bit on a writeable file-system.

comment:7 by axeld, 7 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:8 by diver, 5 years ago

Still here in hrev53129.

comment:9 by pulkomandy, 4 years ago

Milestone: R1R1.1

comment:11 by waddlesplash, 22 months ago

Resolution: fixed
Status: assignedclosed

Merged in hrev56235

Note: See TracTickets for help on using tickets.