Skip to content

"File name too long" when calculating source size (exclusions not respected?) #2115

@HarukaMa

Description

@HarukaMa

Description

I've been getting the error in title when trying to calculate the file count and size of the source, which is the root directory (/). Looks like Vorta somehow is not following exclude rules.

I have custom added rules:

# custom added rules
/dev
/proc
/sys
/tmp
/run
*/.aleo/storage
*/.cache
/mnt

However, as seen in the log below, Vorta traversed into /mnt/hgfs. I can confirm the rules work during backups; /mnt is not included in actual backup archives.

Reproduction

  • I tried to reproduce the issue.
  • I was able to reproduce the issue.

OS

Debian sid, remote x11 display

Version of Vorta

0.10.3

What did you install Vorta with?

Distribution package

Version of Borg

1.4.0

Logs

2024-10-28 21:54:01,862 - root - CRITICAL - Uncaught exception, file a report at https://github.com/borgbase/vorta/issues/new/choose
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/vorta/utils.py", line 49, in run
    self.size, self.files_count = get_path_datasize(self.path, self.exclude_patterns)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vorta/utils.py", line 147, in get_path_datasize
    data_size, files_count = get_directory_size(file_info.absoluteFilePath(), exclude_patterns)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vorta/utils.py", line 117, in get_directory_size
    stat = os.stat(file_path)
           ^^^^^^^^^^^^^^^^^^
OSError: [Errno 36] File name too long: '/mnt/hgfs/C/Program Files/JetBrains/Rider/r2r/2024.2.6R/B9F0CD415B130D99FE8E857FF5CFE9E/windows-x64/dotnet/sdk/8.0.204/DotnetTools/dotnet-watch/8.0.204-servicing.24170.23/tools/net8.0/any/BuildHost-netcore/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.runtimeconfig.json'

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueSimple change to start learning code basehelp wantedThis issue is available, comment if you want to fix itpriority:lowNice to have feature, minor improvement to functionality or usabilitytype:enhancementImprovement of an existing function

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions