mherrmann / mherrmann/fman

Exception on copying from a WebDAV network drive

Open
#564 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug windows
Dominant language
Python
Stars
275
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Hi!

I'm not sure is this a bug or a not-yet-ready feature (#33), so I create a new ticket. I got an exception in Windows version after I'd tried to copy a directory (Z:\backup\) from a network drive (WebDAV) to an internal HDD. WebDAV provider is Yandex.Disk.

Command 'Copy' raised error.

Traceback (most recent call last):
  File "fman\impl\plugins\command_registry.py", line 128, in _execute_command
  File "C:\Users\EvgeniiChernyi\AppData\Local\fman\Versions\1.4.3\Plugins\Core\core\commands\__init__.py", line 502, in __call__
    proceed = self._confirm_tree_operation(files, dest_dir, src_dir)
  File "C:\Users\EvgeniiChernyi\AppData\Local\fman\Versions\1.4.3\Plugins\Core\core\commands\__init__.py", line 575, in _confirm_tree_operation
    if len(files) == 1 and fs.samefile(dest_url, files[0]):
  File "fman\fs.py", line 45, in samefile
  File "fman\impl\plugins\mother_fs.py", line 123, in samefile
  File "fman\impl\plugins\mother_fs.py", line 120, in resolve
  File "C:\Users\EvgeniiChernyi\AppData\Local\fman\Versions\1.4.3\Plugins\Core\core\fs\local\__init__.py", line 180, in resolve
    path = Path(path).resolve()
  File "pathlib.py", line 1109, in resolve
  File "pathlib.py", line 186, in resolve
OSError: [WinError 1] Incorrect function: 'Z:\\backup'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with _confirm_tree_operation in core/commands/init.py and trace fs.samefile through fman/fs.py, fman/impl/plugins/mother_fs.py, and core/fs/local/init.py. Reproduce copying a directory from the reported WebDAV drive on Windows; done means the Copy command no longer raises the shown WinError for that operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.