Skip to content
Snippets Groups Projects
Commit 1c5a46ba authored by akiraohgaki's avatar akiraohgaki
Browse files

Fix invalid cross-device link problem

parent 53d03f5c
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ https://github.com/xdgurl/xdgurl ...@@ -11,6 +11,7 @@ https://github.com/xdgurl/xdgurl
import sys import sys
import os import os
import shutil
import json import json
import tempfile import tempfile
import mimetypes import mimetypes
...@@ -240,7 +241,7 @@ class XdgUrl: ...@@ -240,7 +241,7 @@ class XdgUrl:
os.makedirs(destination) os.makedirs(destination)
print('Saving a file to ' + path) print('Saving a file to ' + path)
os.rename(temp_path, path) shutil.move(temp_path, path)
print('Done') print('Done')
...@@ -293,7 +294,7 @@ class XdgUrl: ...@@ -293,7 +294,7 @@ class XdgUrl:
os.remove(temp_path) os.remove(temp_path)
else: else:
print('Saving a file to ' + path) print('Saving a file to ' + path)
os.rename(temp_path, path) shutil.move(temp_path, path)
print('Done') print('Done')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment