| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
I see regularly the following debug print on Nautilus startup:
`GLib-CRITICAL **: 10:52:52.992: g_hash_table_foreach: assertion
'hash_table != NULL' failed`. This is because the
`emit_change_signals_for_all_files_in_all_directories` function is called
before the `directories` hash table is initialzed. Let's return early
to prevent usage of the uninitialized hash table.
|
| |
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1022
|
|
|
|
|
| |
Replace the eel_boolean_bit typedef with a plain guint and remove all
includes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for files that were still not known to nautilus because they were in
the midst of being added to Nautilus. This happens when eg. inotify
fires two consecutive NEW + CHANGE events for a new file, and it's
important to handle the CHANGE event as the file may have changed
its properties with respect the ones reported at the time the NEW
event fired.
A case this happens is for mountpoint directories of
removable devices, as seen in the referenced bug below.
We now queue CHANGE events received for files unknown to Nautilus only
when the parent folder is currently adding new files. When the folder
finish adding the new files, we then process the list of queued files.
If there are still files unknown to Nautilus in this list, they will
be ignored as before.
https://bugzilla.gnome.org/show_bug.cgi?id=703179
Issue #1576
|
|
|
|
| |
It's going away with GTK4. Use the recomended replacement.
|
|
|
|
|
|
|
|
| |
Turn potentially infinite while loops into for loops with finite
amount of repetitions. In general 1000 tries should be sufficient,
so the chosen amount of 100.000 serves as an upper limit.
See https://gitlab.gnome.org/GNOME/nautilus/-/issues/1290
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When creating a new file using a template, it's possible for is_added
to be FALSE, so make sure the file is unref'd regardless.
This actually resolves an issue in caja and nemo which is caused by
files created in this manner not being finalized when no longer in use.
I can reproduce the issue with nautilus, but this *does not* fix it,
so I think that there may be an additional leak somewhere else (maybe
not related to template-created files).
To reproduce:
- Create an svg file and save in ~/Templates.
- Right-click, Create document-> svg file, name it whatever.
- Navigate out of the folder.
- Modify the file in a visible manner.
- Re-enter the folder, note that it never finishes loading.
Original report:
https://github.com/linuxmint/nemo/issues/2736
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are plain wrappers for g_file_is_native(), and, after the previous
commits, there are only two usages, which are found in:
* window-slot.c, introduced in b3a4eabf01a57b860ea95155f608f33fd08cce27
* files-view.c, introduced in f98d2edb0a71c58127e23a05d58bd12842b57132
In both cases, we can just call g_file_is_native() directly. This way,
we can drop the chronically-misinterpretted is_local() methods, whose
various interpretations are now covered by specific checking methods:
* g_file_is_native()
* nautilus_file_has_local_path()
* !nautilus_file_is_remote()
|
|
|
|
|
|
| |
Avoid calling g_file_get_path() if we have enough information.
Clarify the purpose of this function.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The early "return TRUE;" was added because gnome-vfs didn't have a way
to represent all URIs: 5baaa578051f2f1249a518c256d84d04f221011a
When nautilus was ported to GIO, this early return was kept despite
GnomeVFSURI being superceeded by GFile, which can represent any URI:
469047a2a58430026d68a3b99b223b922b18b8d1
This early return should never happen, because a non-NULL location
is always set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use the is_local_or_fuse() method in 2 cases where we want to know
whether a local path can be obtained for a file in a give location:
1) when determining which apps can open the file, as some apps
don't understand URIs;
2) when providing local paths to scripts from the Scripts menu.
It has been returning TRUE for files in the Trash as a special case,
because they are stored in a real location which can be obtained from
the value of the G_FILE_ATTRIBUTE_STANDARD_TARGET_URI attribute.
However, we have been ignoring this attribute for trashed files since
commit bc22321e5b5b02711b65d8c1b0301a53de42f18b.
This has resulted in two bugs:
1) we pick the default handler to open an application ignoring the
fact that it may not be able to open URIs;
2) we pass relative paths as command-line parameters for scripts,
which they wrongly interpret as being relative to $HOME because
we can't chdir() into trash:///.
As discussed in https://bugzilla.gnome.org/show_bug.cgi?id=768168, we
probably don't want to provide direct access to the real location of
trashed files.
So, let's drop this special case, making is_local_or_fuse() return
FALSE for trash://*, which fixes these two bugs.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That commit mixed the concepts of "file with local path", "local file",
and "native file". They are 3 different things, as documented in GIO.
Now, after the previous commits, the is_local() methods are no longer
employed to check that files have local paths. Instead, we now use
nautilus_file_is_local_or_fuse(), which was introduced[1] in order to
fix[2] for a regression caused by the commit we are now reverting.
[1] 2f1765d80392c06166d077c27a9a6661edd7c128
[2] 4df06e7f14ffefedc65bae84fca1cd7f5e945f78
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The nautilus_[directory,file]_is_local() methods have been confounding
the concepts of "native" and "non-remote" files, ever since the port
from gnome-vfs to GIO in 59511dfee330102ee42e09bef37cbc9cd12973c6
This conceptual mismatch is notorious in the Trash location, which is
neither native nor remote. This soon raised a bug [1], which has been
worked around by introducing a check for nautilus_file_is_in_trash().
Now, after the previous commits, the is_local() methods are no longer
employed to check that files are "non-remote". Instead, we now use
nautilus_file_is_remote(), which correctly reports that the trash is
not remote.
So, this workaround can be droped now.
[1] https://bugzilla.gnome.org/show_bug.cgi?id=546353
|
|
|
|
|
| |
The original linked list can be O(n^2) (n = the number of files)
in the worst case.
|
|
|
|
|
| |
filtering_changed_callback() populates a list of directories, but never
frees the list.
|
|
|
|
|
|
|
|
|
|
|
| |
A method to query maximum filename length has been introduced by
commit a5520fd8930910ffa686232f3fc92325fe47c64e
However, Ernestas has noticed that another implementation was already
present in nautilus-file-operations.c
This commit will replace both with a file-utilities function, which
takes ideas from both implementations.
|
|
|
|
|
|
|
| |
This commit removes redundant header inclusions and tries to optimize
headers by using forward declarations of types in headers. Such
optimization should generally make builds speedier in that changes in
certain headers will not cause unrelated sources to be rebuilt.
|
|
|
|
| |
Leftovers from NautilusLink removal.
|
|
|
|
|
| |
This is to be used by a potential fix for
https://gitlab.gnome.org/GNOME/nautilus/issues/148.
|
| |
|
|
|
|
|
|
|
| |
Shadowing variables is error-prone, since one might mean to refer to a
variable that was declared earlier, but has the same name. Additionally,
being more strict about variable scoping can help make the code more
readable.
|
|
|
|
|
|
|
|
| |
It was a mix of both terms, given that tracker uses 'favorite' but we
use 'starred' in the UI. Since the part that interact with tracker is
minimal, is better to be consistent with the UI.
This renames 'favorite' to 'starred' except the tracker queries.
|
| |
|
|
|
|
|
|
|
| |
This additionally removes some redundant assertions to avoid needless
string copies.
https://bugzilla.gnome.org/show_bug.cgi?id=786760
|
|
|
|
|
|
| |
Another attempt at reducing the amount of internal state accessing.
https://bugzilla.gnome.org/show_bug.cgi?id=786760
|
|
|
|
|
|
|
| |
Add option to make files Favorite, by either toggling a star in the
list view, or from the context menu.
https://bugzilla.gnome.org/show_bug.cgi?id=786039
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=786760
|
|
|
|
|
|
|
|
| |
This commit moves some NautilusVFSDirectory vfunc overrides to
NautilusDirectory, as they directly access NautilusDirectoryDetails
fields.
https://bugzilla.gnome.org/show_bug.cgi?id=786760
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=784941
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now Nautilus was not able to handle files where the user had
no permissions. An error was reported.
The only way for a user to handle those files were to start Nautilus
with sudo, which is something that shoudl be avoided for security
reasons.
On Wayland, is not even possible to launch an application with sudo,
so this is no longer available and therefor no way to handle files
with no permissions.
On 3.22 gvfs added an admin backend with integration with Polkit,
so a file withouth permissions can be accessed using this backend
if the user has the root password.
Add support for the admin backend in Nautilus, where a file will
be opened using it if cannot be read.
There still work to do, basically implement the operations with
this backend too and refactor the code to be able to open from
nautilus application command line also a file withouth permissions.
https://bugzilla.gnome.org/show_bug.cgi?id=773937
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=770609
|
|
|
|
|
|
|
|
| |
And make the style of Nautilus the same for all files.
Hopefully we can fix all the style issues we can find in the next days,
so expect a little of movement on this.
https://bugzilla.gnome.org/show_bug.cgi?id=770564
|
|
|
|
|
|
|
|
|
| |
g_file_is_native() should be enough to decide whether the file is local.
Checking if g_file_get_path() returns a native path lets us know if the
directory is possibly made available by use of FUSE and there is
nautilus_directory_is_local_or_fuse() for that.
https://bugzilla.gnome.org/show_bug.cgi?id=768733
|
|
|
|
|
|
|
|
|
|
|
| |
We use checks to know whether a file is local, using g_file_is_native.
However, we also need to know for some cases when a file, even if no
native, can be handled like native, using FUSE.
This will be needed for the selection of default applications on remote
locations, and will be used in a upcoming patch.
https://bugzilla.gnome.org/show_bug.cgi?id=764506
|
|
And fix make distcheck.
Although libnautilus-private seem self contained, it was actually
depending on the files on src/ for dnd.
Not only that, but files in libnautilus-private also were depending on
dnd files, which you can guess it's wrong.
Before the desktop split, this was working because the files were
distributed, but now was a problem since we reestructured the code, and
now nautilus being a library make distcheck stop working.
First solution was try to fix this inter dependency of files, but at
some point I realized that there was no real point on splitting some of
those files, because for example, is perfectly fine for dnd to need to
access the window functions, and it's perfectly fine for the widgets
in the private library to need to access to all dnd functions.
So seems to me the private library of nautilus is somehow an artificial
split, which provides more problems than solutions.
We needed libnautilus-private to have a private library that we could
isolate from extensions, but I don't think it worth given the problems
it provides, and also, this not so good logical split.
Right now, since with the desktop split we created a libnautilus to be
used by the desktop part of nautilus, extensions have access to all
the API of nautilus. We will think in future how this can be handled if
we want.
So for now, merge the libnautilus-private into src, and let's rethink
a better logic to split the code and the private parts of nautilus than
what we had.
Thanks a lot to Rafael Fonseca for helping in get this done.
https://bugzilla.gnome.org/show_bug.cgi?id=765543
|